/* ══════════════════════════════════════════════
   SintoFome — Material Design 3
   Primary : #E8921A (laranja)
   Secondary: #5BB8D4 (azul)
   Tipografia: Oswald (headlines) + Roboto (body)
   ══════════════════════════════════════════════ */

/* ── Fontes Customizadas ────────────────────── */
@font-face {
    font-family: 'Levibrush';
    src: url('./assets/fonts/LEVIBRUSH.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ── Design Tokens ─────────────────────────── */
:root {
    /* Superfícies (dark baseline) */
    --md-bg:         #0F0F0F;
    --md-surf:       #1C1C1E;
    --md-surf-1:     #252527;
    --md-surf-2:     #2A2A2C;
    --md-surf-3:     #303032;

    /* Conteúdo */
    --md-on-surf:    #E6E1E5;
    --md-on-surf-v:  #9E9EA6;

    /* Primary (laranja) */
    --md-pri:        #E8921A;
    --md-pri-dim:    #C8760A;
    --md-pri-on:     #000000;
    --md-pri-ctr:    rgba(232, 146, 26, 0.14);
    --md-pri-state:  rgba(232, 146, 26, 0.08);

    /* Secondary (azul) */
    --md-sec:        #7DCFEA;
    --md-sec-dim:    #5BB8D4;
    --md-sec-on:     #003547;
    --md-sec-ctr:    rgba(91, 184, 212, 0.14);
    --md-sec-state:  rgba(91, 184, 212, 0.08);

    /* Outline */
    --md-out:        rgba(255,255,255,0.12);
    --md-out-v:      rgba(255,255,255,0.06);

    /* Erro / Sucesso */
    --md-err:        #F2B8B8;
    --md-err-ctr:    rgba(229,57,53,0.12);
    --md-ok:         #81C784;
    --md-ok-ctr:     rgba(76,175,80,0.12);

    /* Elevação (box-shadow) */
    --elev-1: 0 2px 4px rgba(0,0,0,.7),  0 1px 2px rgba(0,0,0,.6);
    --elev-2: 0 4px 8px rgba(0,0,0,.65), 0 2px 4px rgba(0,0,0,.55);
    --elev-3: 0 8px 16px rgba(0,0,0,.6), 0 4px 8px rgba(0,0,0,.5);
    --elev-4: 0 12px 24px rgba(0,0,0,.58), 0 6px 10px rgba(0,0,0,.48);
    --elev-5: 0 20px 40px rgba(0,0,0,.55), 0 10px 16px rgba(0,0,0,.45);

    /* Shape */
    --shape-xs:   2px;
    --shape-sm:   2px;
    --shape-md:   4px;
    --shape-lg:   4px;
    --shape-xl:   8px;
    --shape-full: 9999px;

    /* Aliases para compatibilidade com código existente */
    --sf-bg:          var(--md-bg);
    --sf-surface:     var(--md-surf);
    --sf-surface-2:   var(--md-surf-2);
    --sf-orange:      var(--md-pri);
    --sf-orange-dark: var(--md-pri-dim);
    --sf-blue:        var(--md-sec-dim);
    --sf-blue-light:  var(--md-sec);
    --sf-text:        var(--md-on-surf);
    --sf-text-muted:  var(--md-on-surf-v);
    --sf-border:      var(--md-out);
    --sf-glow-orange: rgba(232,146,26,.14);
    --sf-glow-blue:   rgba(91,184,212,.12);
}

/* ── Reset & Base ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

html, body {
    background-color: var(--md-bg) !important;
}

[data-theme="dark"]  { background-color: #0F0F0F; }
[data-theme="gray"]  { background-color: #202020; }
[data-theme="light"] { background-color: #F3EFF4; }

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] { background-color: #0F0F0F; }
}
@media (prefers-color-scheme: light) {
    [data-theme="auto"] { background-color: #F3EFF4; }
}

body {
    color: var(--md-on-surf);
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: var(--md-on-surf);
    margin: 0;
}

a { text-decoration: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--md-bg); }
::-webkit-scrollbar-thumb { background: var(--md-surf-3); border-radius: var(--shape-full); }
::-webkit-scrollbar-thumb:hover { background: var(--md-pri-dim); }

.text-orange { color: var(--md-pri); }
.text-blue   { color: var(--md-sec); }

/* ══════════ TOP APP BAR ══════════ */
.sf-navbar {
    background: #1a1a1c !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.8), 0 1px 2px rgba(0,0,0,.7) !important;
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
    border-bottom: none;
}

.sf-navbar.elevated {
    box-shadow: 0 4px 8px rgba(0,0,0,.85), 0 2px 4px rgba(0,0,0,.75) !important;
}

.sf-navbar .nav-wrapper { height: 64px; }

.sf-navbar .brand-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-logo-wrap {
    height: 46px;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-logo {
    height: 74px;
    width: auto;
    flex-shrink: 0;
    margin: 0 4px;
    transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.85; }

.nav-labs-text {
    font-family: 'Levibrush', 'Roboto', sans-serif;
    font-size: 1.9rem;
    color: var(--md-on-surf);
    line-height: 1;
    letter-spacing: 1px;
    align-self: flex-end;
    margin-bottom: 8px;
}

.nav-labs-accent {
    color: #ffffff;
}

[data-theme="light"] .nav-labs-accent {
    color: #000000;
}

@media (prefers-color-scheme: light) {
    [data-theme="auto"] .nav-labs-accent {
        color: #000000;
    }
}

/* Nav links */
.sf-navbar ul a {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.1px;
    color: var(--md-on-surf-v);
    text-transform: none;
    transition: color 0.2s;
    border-radius: var(--shape-full);
    position: relative;
}

.sf-navbar ul a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.2s;
}

.sf-navbar ul a:hover { color: var(--md-on-surf); background: transparent; }
.sf-navbar ul a:hover::after { opacity: 0.08; }

.sf-navbar .sidenav-trigger { color: var(--md-on-surf); }

/* Navigation Drawer (mobile) */
.sf-sidenav {
    background: var(--md-surf) !important;
    box-shadow: var(--elev-4);
}

.sf-sidenav li > a {
    color: var(--md-on-surf) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--shape-full);
    margin: 2px 8px;
    height: 48px;
    line-height: 48px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
}

.sf-sidenav li > a:hover {
    background: var(--md-pri-state) !important;
    color: var(--md-pri) !important;
}

.sf-sidenav li > a > i {
    color: var(--md-on-surf-v) !important;
    font-size: 1.25rem;
}

.sf-sidenav li > a:hover > i { color: var(--md-pri) !important; }
.sf-sidenav .divider { background-color: var(--md-out) !important; margin: 8px 0; }

.sidenav-logo {
    max-width: 110px;
    margin: 28px auto 16px;
    display: block;
    opacity: 0.85;
}

/* Nav user avatar */
.nav-avatar-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0 12px;
    height: 64px;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--md-pri-ctr);
    border: 2px solid var(--md-pri);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--md-pri);
}

.nav-badge {
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: var(--shape-full);
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-vip    { background: var(--md-pri-ctr); color: var(--md-pri); }
.badge-admin  { background: var(--md-err-ctr); color: var(--md-err); }
.badge-normal { background: var(--md-surf-2);  color: var(--md-on-surf-v); }

/* ══════════ PAGES ══════════ */
.page-section {
    min-height: calc(100vh - 64px);
    padding-top: 64px;
}

/* ══════════ HERO ══════════ */
.sf-hero, .sf-hero-compact {
    background: var(--md-surf-1);
    border-bottom: 1px solid var(--md-out);
}

.sf-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.sf-hero-compact {
    min-height: 0;
    height: auto;
    margin-top: -64px;
    padding-top: 96px;
    padding-bottom: 40px;
    background: #0F0F0F;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
}

.hero-logo-img {
    height: 260px;
    width: auto;
    display: block;
    margin: -60px auto -70px;
    transform: scale(1.1);
    filter: drop-shadow(0 4px 32px rgba(232,146,26,0.30));
    transition: filter 0.3s ease;
}

.hero-logo-img:hover {
    filter: drop-shadow(0 4px 48px rgba(232,146,26,0.55));
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.54);
    margin-top: 0;
    font-weight: 400;
}

[data-theme="light"] .hero-subtitle { color: var(--md-on-surf-v); }

@media (prefers-color-scheme: light) {
    [data-theme="auto"] .hero-subtitle { color: var(--md-on-surf-v); }
}

/* ══════════ BOTÕES (MD) ══════════ */

/* Filled button */
.sf-btn-primary {
    background: var(--md-pri) !important;
    color: var(--md-pri-on) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.1px;
    text-transform: none;
    border-radius: var(--shape-full) !important;
    box-shadow: var(--elev-1) !important;
    transition: box-shadow 0.2s, background 0.2s;
    height: 40px;
    line-height: 40px;
    padding: 0 24px;
}

.sf-btn-primary:hover {
    background: color-mix(in srgb, var(--md-pri) 92%, white 8%) !important;
    box-shadow: var(--elev-2) !important;
}

/* Tonal button */
.sf-btn-blue {
    background: var(--md-sec-ctr) !important;
    color: var(--md-sec) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: none;
    border-radius: var(--shape-full) !important;
    box-shadow: none !important;
    transition: background 0.2s;
    height: 40px;
    line-height: 40px;
    padding: 0 24px;
}

.sf-btn-blue:hover { background: rgba(91,184,212,0.22) !important; }

/* Text button */
.sf-btn-flat {
    color: var(--md-pri) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: none;
    border-radius: var(--shape-full) !important;
    padding: 0 12px;
}

.sf-btn-flat:hover { background: var(--md-pri-state) !important; }

/* ══════════ SECTION HEADERS ══════════ */
.section-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--md-out);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--md-on-surf);
}

.section-title i { color: var(--md-pri); font-size: 1.6rem; }

.subsection-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--md-sec-dim);
    margin: 36px 0 16px;
    padding-left: 12px;
    border-left: 3px solid var(--md-sec-dim);
}

/* ══════════ MD CHIPS ══════════ */
.feed-filters-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    position: relative;
}

.feed-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    margin-bottom: 0;
}

/* Filter chip */
.sf-chip {
    display: inline-flex !important;
    align-items: center;
    background: transparent !important;
    color: var(--md-on-surf-v) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: 0.3px;
    text-transform: none;
    border: 1px solid var(--md-out) !important;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--shape-full) !important;
    padding: 0 18px;
    height: 34px;
    line-height: 32px;
}

.sf-chip:hover {
    background: var(--md-pri-state) !important;
    color: var(--md-pri) !important;
    border-color: var(--md-pri) !important;
}

.sf-chip.active {
    background: var(--md-pri-ctr) !important;
    color: var(--md-pri) !important;
    border-color: var(--md-pri) !important;
    font-weight: 600;
}

/* Per-category chip colors — dark (default) */
[data-cat="tech"].sf-chip:hover,     [data-cat="tech"].sf-chip.active     { background: rgba(33,150,243,0.14) !important;  color: #64B5F6 !important;  border-color: #64B5F6 !important; }
[data-cat="ai"].sf-chip:hover,       [data-cat="ai"].sf-chip.active       { background: rgba(124,77,255,0.14) !important;  color: #CE93D8 !important;  border-color: #CE93D8 !important; }
[data-cat="games"].sf-chip:hover,    [data-cat="games"].sf-chip.active    { background: rgba(255,152,0,0.14) !important;   color: #FFB74D !important;  border-color: #FFB74D !important; }
[data-cat="f1"].sf-chip:hover,       [data-cat="f1"].sf-chip.active       { background: rgba(229,57,53,0.14) !important;   color: #EF9A9A !important;  border-color: #EF9A9A !important; }
[data-cat="futebol"].sf-chip:hover,  [data-cat="futebol"].sf-chip.active  { background: rgba(0,200,83,0.14) !important;    color: #69F0AE !important;  border-color: #69F0AE !important; }
[data-cat="brasil"].sf-chip:hover,   [data-cat="brasil"].sf-chip.active   { background: rgba(255,214,0,0.13) !important;   color: #FFF176 !important;  border-color: #FFF176 !important; }
[data-cat="mundo"].sf-chip:hover,    [data-cat="mundo"].sf-chip.active    { background: rgba(96,125,139,0.18) !important;  color: #90A4AE !important;  border-color: #90A4AE !important; }
[data-cat="negocios"].sf-chip:hover, [data-cat="negocios"].sf-chip.active { background: rgba(0,150,136,0.14) !important;   color: #4DB6AC !important;  border-color: #4DB6AC !important; }

/* Per-category chip colors — gray */
[data-theme="gray"] [data-cat="tech"].sf-chip:hover,     [data-theme="gray"] [data-cat="tech"].sf-chip.active     { background: rgba(33,150,243,0.16) !important;  color: #90CAF9 !important;  border-color: #90CAF9 !important; }
[data-theme="gray"] [data-cat="ai"].sf-chip:hover,       [data-theme="gray"] [data-cat="ai"].sf-chip.active       { background: rgba(124,77,255,0.16) !important;  color: #E1BEE7 !important;  border-color: #E1BEE7 !important; }
[data-theme="gray"] [data-cat="games"].sf-chip:hover,    [data-theme="gray"] [data-cat="games"].sf-chip.active    { background: rgba(255,152,0,0.16) !important;   color: #FFCC80 !important;  border-color: #FFCC80 !important; }
[data-theme="gray"] [data-cat="f1"].sf-chip:hover,       [data-theme="gray"] [data-cat="f1"].sf-chip.active       { background: rgba(229,57,53,0.16) !important;   color: #FFCDD2 !important;  border-color: #FFCDD2 !important; }
[data-theme="gray"] [data-cat="futebol"].sf-chip:hover,  [data-theme="gray"] [data-cat="futebol"].sf-chip.active  { background: rgba(0,200,83,0.16) !important;    color: #B9F6CA !important;  border-color: #B9F6CA !important; }
[data-theme="gray"] [data-cat="brasil"].sf-chip:hover,   [data-theme="gray"] [data-cat="brasil"].sf-chip.active   { background: rgba(255,214,0,0.15) !important;   color: #FFFF8D !important;  border-color: #FFFF8D !important; }
[data-theme="gray"] [data-cat="mundo"].sf-chip:hover,    [data-theme="gray"] [data-cat="mundo"].sf-chip.active    { background: rgba(96,125,139,0.20) !important;  color: #B0BEC5 !important;  border-color: #B0BEC5 !important; }
[data-theme="gray"] [data-cat="negocios"].sf-chip:hover, [data-theme="gray"] [data-cat="negocios"].sf-chip.active { background: rgba(0,150,136,0.16) !important;   color: #80CBC4 !important;  border-color: #80CBC4 !important; }

/* Per-category chip colors — light */
[data-theme="light"] [data-cat="tech"].sf-chip:hover,     [data-theme="light"] [data-cat="tech"].sf-chip.active     { background: rgba(33,150,243,0.12) !important;  color: #1565C0 !important;  border-color: #1565C0 !important; }
[data-theme="light"] [data-cat="ai"].sf-chip:hover,       [data-theme="light"] [data-cat="ai"].sf-chip.active       { background: rgba(124,77,255,0.12) !important;  color: #4527A0 !important;  border-color: #4527A0 !important; }
[data-theme="light"] [data-cat="games"].sf-chip:hover,    [data-theme="light"] [data-cat="games"].sf-chip.active    { background: rgba(255,152,0,0.12) !important;   color: #E65100 !important;  border-color: #E65100 !important; }
[data-theme="light"] [data-cat="f1"].sf-chip:hover,       [data-theme="light"] [data-cat="f1"].sf-chip.active       { background: rgba(229,57,53,0.12) !important;   color: #B71C1C !important;  border-color: #B71C1C !important; }
[data-theme="light"] [data-cat="futebol"].sf-chip:hover,  [data-theme="light"] [data-cat="futebol"].sf-chip.active  { background: rgba(0,200,83,0.12) !important;    color: #1B5E20 !important;  border-color: #1B5E20 !important; }
[data-theme="light"] [data-cat="brasil"].sf-chip:hover,   [data-theme="light"] [data-cat="brasil"].sf-chip.active   { background: rgba(255,214,0,0.18) !important;   color: #F57F17 !important;  border-color: #F57F17 !important; }
[data-theme="light"] [data-cat="mundo"].sf-chip:hover,    [data-theme="light"] [data-cat="mundo"].sf-chip.active    { background: rgba(96,125,139,0.14) !important;  color: #37474F !important;  border-color: #37474F !important; }
[data-theme="light"] [data-cat="negocios"].sf-chip:hover, [data-theme="light"] [data-cat="negocios"].sf-chip.active { background: rgba(0,150,136,0.12) !important;   color: #004D40 !important;  border-color: #004D40 !important; }

/* ══════════ CATEGORY LABELS (dentro dos cards) ══════════ */
.card-category {
    display: inline-flex;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: var(--shape-full);
    padding: 2px 10px;
    margin-bottom: 10px;
}

.cat-label-tech     { background: rgba(33,150,243,0.14);  color: #64B5F6; }
.cat-label-ai       { background: rgba(124,77,255,0.14);  color: #CE93D8; }
.cat-label-games    { background: rgba(255,152,0,0.14);   color: #FFB74D; }
.cat-label-f1       { background: rgba(229,57,53,0.14);   color: #EF9A9A; }
.cat-label-futebol  { background: rgba(0,200,83,0.14);    color: #69F0AE; }
.cat-label-brasil   { background: rgba(255,214,0,0.13);   color: #FFF176; }
.cat-label-mundo    { background: rgba(96,125,139,0.18);  color: #90A4AE; }
.cat-label-negocios { background: rgba(0,150,136,0.14);   color: #4DB6AC; }
.cat-label-economia { background: rgba(0,150,136,0.14);   color: #4DB6AC; }
.cat-label-epic     { background: rgba(125,207,234,0.12); color: var(--md-sec); }

[data-theme="gray"] .cat-label-tech     { background: rgba(33,150,243,0.16);  color: #90CAF9; }
[data-theme="gray"] .cat-label-ai       { background: rgba(124,77,255,0.16);  color: #E1BEE7; }
[data-theme="gray"] .cat-label-games    { background: rgba(255,152,0,0.16);   color: #FFCC80; }
[data-theme="gray"] .cat-label-f1       { background: rgba(229,57,53,0.16);   color: #FFCDD2; }
[data-theme="gray"] .cat-label-futebol  { background: rgba(0,200,83,0.16);    color: #B9F6CA; }
[data-theme="gray"] .cat-label-brasil   { background: rgba(255,214,0,0.15);   color: #FFFF8D; }
[data-theme="gray"] .cat-label-mundo    { background: rgba(96,125,139,0.20);  color: #B0BEC5; }
[data-theme="gray"] .cat-label-negocios { background: rgba(0,150,136,0.16);   color: #80CBC4; }
[data-theme="gray"] .cat-label-economia { background: rgba(0,150,136,0.16);   color: #80CBC4; }

[data-theme="light"] .cat-label-tech     { background: rgba(33,150,243,0.12);  color: #1565C0; }
[data-theme="light"] .cat-label-ai       { background: rgba(124,77,255,0.12);  color: #4527A0; }
[data-theme="light"] .cat-label-games    { background: rgba(255,152,0,0.12);   color: #E65100; }
[data-theme="light"] .cat-label-f1       { background: rgba(229,57,53,0.12);   color: #B71C1C; }
[data-theme="light"] .cat-label-futebol  { background: rgba(0,200,83,0.12);    color: #1B5E20; }
[data-theme="light"] .cat-label-brasil   { background: rgba(255,214,0,0.18);   color: #F57F17; }
[data-theme="light"] .cat-label-mundo    { background: rgba(96,125,139,0.14);  color: #37474F; }
[data-theme="light"] .cat-label-negocios { background: rgba(0,150,136,0.12);   color: #004D40; }
[data-theme="light"] .cat-label-economia { background: rgba(0,150,136,0.12);   color: #004D40; }

/* ══════════ BUSCA ══════════ */

.sf-search-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    flex-shrink: 0;
}

.sf-search-expandable {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 400ms cubic-bezier(0.4,0.0,0.2,1),
                opacity 300ms cubic-bezier(0.4,0.0,0.2,1);
    display: flex;
    flex-direction: column;
    background: var(--md-surf-1);
    border: 1px solid var(--md-out);
    border-radius: 4px;
    margin-right: 8px;
}
.sf-search-expandable.open {
    width: 700px;
    opacity: 1;
    border-color: var(--md-pri);
    box-shadow: 0 0 0 2px var(--md-pri-ctr);
}

.sf-search-input-field {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--md-on-surf) !important;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    height: 36px;
    margin: 0 !important;
    padding: 0 12px !important;
    outline: none;
    width: 100%;
}
.sf-search-input-field::placeholder { color: var(--md-on-surf-v); }

.sf-search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(232,146,26,0.14);
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 200ms cubic-bezier(0.4,0.0,0.2,1);
}
.sf-search-btn:hover,
.sf-search-btn:focus,
.sf-search-btn:active,
.sf-search-btn:focus-visible { background: rgba(232,146,26,0.22); outline: none; }
.sf-search-btn .material-icons {
    color: var(--md-pri);
    font-size: 20px !important;
}

.sf-suggestions {
    position: relative;
    background: var(--md-surf-2);
    border: 1px solid var(--md-out);
    border-radius: 4px;
    box-shadow: var(--elev-3);
    z-index: 200;
    overflow: hidden;
    display: none;
    margin-bottom: 16px;
}
.sf-suggestions.visible { display: block; }

.sf-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 150ms;
    border-bottom: 1px solid var(--md-out-v);
}
.sf-suggestion-item:last-child { border-bottom: none; }
.sf-suggestion-item:hover { background: var(--md-pri-state); }
.sf-suggestion-item i {
    color: var(--md-on-surf-v);
    font-size: 16px !important;
    margin-top: 2px;
    flex-shrink: 0;
}

.sf-suggestion-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--md-on-surf);
    line-height: 1.3;
    margin-bottom: 2px;
}
.sf-suggestion-meta { font-size: 0.7rem; color: var(--md-on-surf-v); }
.sf-suggestion-highlight { color: var(--md-pri); font-weight: 700; }

/* ══════════ FEED — Layout agrupado por data ══════════ */

.feed-status {
    color: var(--md-on-surf-v);
    padding: 40px 0;
    text-align: center;
}

.feed-date-group {
    margin-bottom: 32px;
}

.feed-date-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.feed-date-divider::before,
.feed-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--md-out-v);
}

.feed-date-label {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--md-on-surf-v);
    white-space: nowrap;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ══════════ FEED CARDS ══════════ */
.sf-card {
    background: var(--md-surf-1) !important;
    border-radius: var(--shape-md);
    box-shadow: var(--elev-1);
    overflow: hidden;
    transition: box-shadow 200ms cubic-bezier(0.4, 0.0, 0.2, 1),
                transform 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    border: 1px solid var(--md-out-v);
    cursor: pointer;
}

.sf-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-card:hover {
    box-shadow: var(--elev-4);
    transform: translateY(-4px);
}

.sf-card .card-content { padding: 18px 20px; }

.sf-card .card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.sf-card .card-time {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    color: var(--md-on-surf-v);
}

.sf-card .card-title {
    font-family: 'Roboto', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    color: var(--md-on-surf) !important;
    line-height: 1.4;
    margin-bottom: 8px;
    display: block;
}

.sf-card .card-desc {
    font-size: 0.8125rem;
    color: var(--md-on-surf-v);
    line-height: 1.55;
    margin: 0;
}

/* ══════════ HOME HUB — Hero Compacto ══════════ */

/* ══════════ HIGHLIGHT CARDS (Destaques) ══════════ */
.sf-highlight-card {
    background: var(--md-surf-1) !important;
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-md);
    box-shadow: var(--elev-1);
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 200ms cubic-bezier(0.4, 0.0, 0.2, 1),
                transform 200ms cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
}

.sf-highlight-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-highlight-card:hover {
    box-shadow: var(--elev-4);
    transform: translateY(-4px);
}

.highlight-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--md-on-surf);
    margin: 0;
    line-height: 1.4;
}

.highlight-desc {
    font-size: 0.8125rem;
    color: var(--md-on-surf-v);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.highlight-cta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--md-pri);
    margin-top: 6px;
}

/* ══════════ TOPIC CARDS (Tópicos) ══════════ */
.sf-topic-card {
    background: var(--md-surf-1) !important;
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-lg);
    box-shadow: var(--elev-1);
    padding: 28px 20px 22px;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.2s;
    opacity: 0;
    transform: translateY(20px);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Tonal overlay com a cor do tópico */
.sf-topic-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--topic-color, var(--md-pri));
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.sf-topic-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-topic-card:hover {
    box-shadow: var(--elev-3);
    transform: translateY(-4px);
}

.sf-topic-card:hover::before { opacity: 0.06; }

.topic-icon {
    font-size: 2.6rem;
    margin-bottom: 10px;
    display: block;
}

.topic-name {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--md-on-surf);
    margin: 0 0 6px;
}

.topic-count {
    display: inline-block;
    font-size: 0.6875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    background: var(--md-surf-3);
    color: var(--md-on-surf-v);
    padding: 2px 10px;
    border-radius: var(--shape-full);
    margin-bottom: 12px;
    border: 1px solid var(--md-out);
}

.topic-carousel {
    position: relative;
    height: 44px;
    overflow: hidden;
    margin: 0 0 16px;
    width: 100%;
}

.topic-carousel-item {
    position: absolute;
    width: 100%;
    font-size: 0.8rem;
    color: var(--md-on-surf-v);
    line-height: 1.4;
    text-align: center;
    padding: 0 8px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-carousel-item.active {
    opacity: 1;
    transform: translateY(0);
}

.topic-carousel-item.exit {
    opacity: 0;
    transform: translateY(-20px);
}

.topic-cta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--topic-color, var(--md-pri));
    padding: 6px 16px;
    border: 1px solid var(--topic-color, var(--md-pri));
    border-radius: var(--shape-full);
    transition: all 0.2s;
    opacity: 0.85;
}

.sf-topic-card:hover .topic-cta {
    background: var(--topic-color, var(--md-pri));
    color: #000;
    opacity: 1;
}

/* ══════════ PROJETOS — BLOG HUB ══════════ */
.projetos-intro {
    color: var(--md-on-surf-v);
    font-size: 0.9375rem;
    margin-bottom: 28px;
    margin-top: -10px;
    line-height: 1.5;
}

/* Status badges */
.proj-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.6875rem;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: var(--shape-full);
}

.status-ongoing { background: var(--md-pri-ctr);  color: var(--md-pri);        border: 1px solid rgba(232,146,26,.3); }
.status-done    { background: var(--md-ok-ctr);   color: var(--md-ok);         border: 1px solid rgba(76,175,80,.3);  }
.status-paused  { background: var(--md-surf-2);   color: var(--md-on-surf-v);  border: 1px solid var(--md-out);       }

/* Tags */
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.proj-tag {
    font-size: 0.6875rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    background: var(--md-sec-ctr);
    color: var(--md-sec-dim);
    border: 1px solid rgba(91,184,212,.2);
    padding: 2px 10px;
    border-radius: var(--shape-full);
    letter-spacing: 0.2px;
}

.proj-tag-more {
    background: var(--md-surf-2);
    color: var(--md-on-surf-v);
    border-color: var(--md-out);
}

/* Leia mais / cta inline */
.proj-read-more {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--md-pri);
    cursor: pointer;
}

.proj-github-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--md-on-surf-v);
}

/* ── Card em Destaque ── */
.sf-project-featured {
    display: flex;
    gap: 24px;
    background: var(--md-surf-1);
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-lg);
    box-shadow: var(--elev-2);
    padding: 28px 24px;
    margin-bottom: 28px;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.sf-project-featured:hover {
    box-shadow: var(--elev-4);
    transform: translateY(-3px);
}

.proj-feat-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 64px;
}

.proj-feat-icon { font-size: 3rem; }
.proj-feat-body { flex: 1; }

.proj-feat-date {
    font-size: 0.75rem;
    color: var(--md-on-surf-v);
    margin: 0 0 6px;
}

.proj-feat-title {
    font-size: 1.5rem;
    margin: 0 0 4px;
    line-height: 1.2;
    color: var(--md-on-surf);
}

.proj-feat-subtitle {
    font-size: 0.875rem;
    color: var(--md-pri);
    margin: 0 0 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

.proj-feat-desc {
    color: var(--md-on-surf-v);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.proj-feat-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .sf-project-featured { flex-direction: column; gap: 14px; }
    .proj-feat-left { flex-direction: row; min-width: unset; }
    .proj-feat-title { font-size: 1.2rem; }
}

/* ── Project Post Card (grid) ── */
.sf-project-post {
    background: var(--md-surf-1);
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-md);
    box-shadow: var(--elev-1);
    padding: 20px;
    cursor: pointer;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: calc(100% - 24px);
}

.sf-project-post.visible {
    opacity: 1;
    transform: translateY(0);
}

.sf-project-post:hover {
    box-shadow: var(--elev-3);
    transform: translateY(-4px);
}

.proj-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.proj-post-icon { font-size: 1.75rem; }

.proj-post-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.35;
    color: var(--md-on-surf);
    margin: 0 0 2px;
}

.proj-post-sub {
    font-size: 0.8rem;
    color: var(--md-pri);
    margin: 0 0 6px;
    font-weight: 400;
}

.proj-post-desc {
    font-size: 0.8125rem;
    color: var(--md-on-surf-v);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.proj-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--md-out);
}

.proj-post-date {
    font-size: 0.7rem;
    color: var(--md-on-surf-v);
}

/* ══════════ VIP ══════════ */
.vip-locked {
    text-align: center;
    padding: 64px 20px;
}

.vip-locked i {
    font-size: 4rem;
    color: var(--md-pri-dim);
    opacity: 0.4;
}

.vip-locked h4 {
    color: var(--md-on-surf-v);
    margin: 20px 0 8px;
    font-size: 1.3rem;
}

.vip-locked p { color: var(--md-on-surf-v); font-size: 0.9rem; }

.vip-card {
    background: var(--md-surf-1);
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-md);
    box-shadow: var(--elev-1);
    padding: 22px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}

.vip-card:hover { box-shadow: var(--elev-2); }

.vip-card h5 {
    font-size: 1rem;
    color: var(--md-pri);
    margin-bottom: 6px;
}

.vip-card p {
    color: var(--md-on-surf-v);
    font-size: 0.875rem;
    margin: 0;
}

/* ══════════ ADMIN ══════════ */
.admin-denied {
    text-align: center;
    padding: 64px 20px;
}

.admin-denied i {
    font-size: 4rem;
    color: var(--md-err);
    opacity: 0.4;
}

.sf-table-wrapper {
    background: var(--md-surf-1);
    border: 1px solid var(--md-out-v);
    border-radius: var(--shape-md);
    box-shadow: var(--elev-1);
    overflow: hidden;
}

.sf-table { margin: 0 !important; }

.sf-table thead { background: var(--md-surf-2); }

.sf-table th {
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    color: var(--md-on-surf-v) !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid var(--md-out) !important;
}

.sf-table td {
    color: var(--md-on-surf) !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid var(--md-out-v) !important;
    font-size: 0.875rem;
}

.sf-table tbody tr:hover { background: var(--md-surf-2) !important; }

.nivel-select {
    background: var(--md-surf-2) !important;
    color: var(--md-on-surf) !important;
    border: 1px solid var(--md-out) !important;
    border-radius: var(--shape-xs) !important;
    padding: 4px 8px !important;
    font-size: 0.8rem;
    height: auto !important;
}

/* ══════════ MODAL ══════════ */
.sf-modal {
    background: var(--md-surf-2) !important;
    border-radius: var(--shape-xl) !important;
    box-shadow: var(--elev-5) !important;
    max-width: 440px;
    border: none;
}

.sf-modal-project {
    max-width: 680px !important;
    width: 90% !important;
}

.sf-modal .modal-content { padding: 28px 28px 12px; }

.modal-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 1.5rem !important;
    letter-spacing: 1px;
    color: var(--md-on-surf) !important;
    margin-bottom: 20px !important;
    text-transform: uppercase;
}

/* Input fields no modal */
.sf-modal input {
    color: var(--md-on-surf) !important;
    border-bottom-color: var(--md-out) !important;
}

.sf-modal input:focus {
    border-bottom-color: var(--md-pri) !important;
    box-shadow: 0 1px 0 0 var(--md-pri) !important;
}

.sf-modal label { color: var(--md-on-surf-v) !important; }
.sf-modal input:focus + label { color: var(--md-pri) !important; }
.sf-modal .prefix { color: var(--md-on-surf-v) !important; }
.sf-modal .prefix.active { color: var(--md-pri) !important; }

.auth-toggle-text { font-size: 0.875rem; color: var(--md-on-surf-v); }
.auth-toggle-text a { color: var(--md-sec-dim) !important; font-weight: 500; }

.sf-modal-footer {
    background: transparent !important;
    padding: 8px 20px 20px !important;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Modal de projeto */
.proj-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}

.proj-modal-icon { font-size: 2.8rem; line-height: 1; }

.proj-modal-title {
    font-size: 1.4rem !important;
    color: var(--md-on-surf) !important;
    margin: 6px 0 4px !important;
}

.proj-modal-sub {
    font-size: 0.875rem;
    color: var(--md-pri);
    margin: 0;
}

.proj-modal-body {
    color: var(--md-on-surf);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.proj-modal-body p { margin-bottom: 10px; }
.proj-modal-body strong { color: var(--md-pri); font-weight: 600; }

.proj-flow-placeholder {
    background: var(--md-surf-3);
    border: 1px dashed var(--md-out);
    border-radius: var(--shape-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 18px;
    color: var(--md-on-surf-v);
}

.proj-flow-placeholder i {
    font-size: 2rem;
    color: var(--md-sec-dim);
    display: block;
    margin-bottom: 8px;
}

.proj-flow-placeholder p { margin: 0 0 4px; font-size: 0.85rem; }
.proj-flow-placeholder span { font-size: 0.75rem; color: var(--md-on-surf-v); font-style: italic; }
.proj-modal-date { font-size: 0.75rem; color: var(--md-on-surf-v); margin-top: 6px; }

/* ══════════ FOOTER ══════════ */
.sf-footer {
    background: var(--md-surf-1);
    border-top: 1px solid var(--md-out);
    padding: 28px 0;
    margin-top: 48px;
}

.footer-logo {
    height: 100px;
    opacity: 0.5;
}

/* ══════════ DROPDOWNS / MENUS ══════════ */
.dropdown-content {
    background: var(--md-surf-2) !important;
    border-radius: var(--shape-md) !important;
    box-shadow: var(--elev-3) !important;
    border: 1px solid var(--md-out-v);
    overflow: hidden;
}

.dropdown-content li > a {
    color: var(--md-on-surf) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 10px 16px;
    transition: background 0.15s;
}

.dropdown-content li > a:hover {
    background: var(--md-pri-state) !important;
    color: var(--md-pri) !important;
}

/* Toast override */
.toast {
    background: var(--md-surf-3) !important;
    color: var(--md-on-surf) !important;
    border-radius: var(--shape-sm) !important;
    font-family: 'Roboto', sans-serif;
    font-size: 0.875rem;
    box-shadow: var(--elev-3) !important;
}
[data-theme="light"] .toast { color: #1C1B1F !important; }
@media (prefers-color-scheme: light) {
    [data-theme="auto"] .toast { color: #1C1B1F !important; }
}

/* ══════════ THEME SWITCHER ══════════ */
.hero-logo { display: none; }

.theme-icon {
    color: var(--md-on-surf-v);
    font-size: 1.3rem !important;
    transition: color 0.2s;
    line-height: 64px !important;
    display: block;
    padding: 0 4px;
}

.theme-icon:hover { color: var(--md-pri) !important; }

.sf-theme-dropdown {
    background: var(--md-surf-2) !important;
    border: 1px solid var(--md-out-v) !important;
    border-radius: var(--shape-md) !important;
    min-width: 180px;
    box-shadow: var(--elev-3) !important;
}

.sf-theme-dropdown li > a {
    color: var(--md-on-surf) !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    padding: 10px 16px !important;
    letter-spacing: 0;
    text-transform: none !important;
}

.sf-theme-dropdown li > a:hover {
    background: var(--md-pri-state) !important;
    color: var(--md-pri) !important;
}

.sf-theme-dropdown li > a i { color: var(--md-on-surf-v); font-size: 1.1rem; }
.sf-theme-dropdown li > a:hover i { color: var(--md-pri); }
.sf-theme-dropdown li > a.theme-active { color: var(--md-pri) !important; font-weight: 500; }
.sf-theme-dropdown li > a.theme-active i { color: var(--md-pri); }

/* ══════════ TEMAS ══════════ */

/* ── Escuro (padrão) ── */
[data-theme="dark"] {
    --md-bg:      #0F0F0F;
    --md-surf:    #1C1C1E;
    --md-surf-1:  #252527;
    --md-surf-2:  #2A2A2C;
    --md-surf-3:  #303032;
    --md-on-surf: #E6E1E5;
    --md-on-surf-v:#938F99;
    --md-out:     rgba(255,255,255,0.12);
    --md-out-v:   rgba(255,255,255,0.06);
}

/* ── Meio-termo (cinza) ── */
[data-theme="gray"] {
    --md-bg:       #202020;
    --md-surf:     #2A2A2A;
    --md-surf-1:   #333333;
    --md-surf-2:   #3A3A3A;
    --md-surf-3:   #424242;
    --md-on-surf:  #EFEFEF;
    --md-on-surf-v:#AAAAAA;
    --md-out:      rgba(255,255,255,0.14);
    --md-out-v:    rgba(255,255,255,0.07);
}

/* ── Claro ── */
[data-theme="light"] {
    --md-bg:       #F3EFF4;
    --md-surf:     #FFFBFE;
    --md-surf-1:   #F7F2FA;
    --md-surf-2:   #ECE6F0;
    --md-surf-3:   #E6E0EC;
    --md-on-surf:  #1C1B1F;
    --md-on-surf-v:#49454F;
    --md-out:      rgba(0,0,0,0.12);
    --md-out-v:    rgba(0,0,0,0.06);
    --md-pri-state: rgba(232,146,26,0.08);
    --md-sec-state: rgba(91,184,212,0.08);
    --elev-1: 0 2px 4px rgba(0,0,0,.24), 0 1px 2px rgba(0,0,0,.20);
    --elev-2: 0 4px 8px rgba(0,0,0,.22), 0 2px 4px rgba(0,0,0,.18);
    --elev-3: 0 8px 16px rgba(0,0,0,.20), 0 4px 6px rgba(0,0,0,.16);
    --elev-4: 0 12px 24px rgba(0,0,0,.18), 0 6px 8px rgba(0,0,0,.14);
    --elev-5: 0 20px 40px rgba(0,0,0,.16), 0 10px 12px rgba(0,0,0,.12);
}

[data-theme="light"] .sf-topic-card:hover::before { opacity: 0.03 !important; }

[data-theme="light"] .sf-navbar { background: var(--md-surf) !important; }
[data-theme="light"] .sf-sidenav { background: var(--md-surf) !important; }
[data-theme="light"] .sf-footer  { background: var(--md-surf); }
[data-theme="light"] .sf-hero, [data-theme="light"] .sf-hero-compact { background: var(--md-surf-1); border-bottom-color: var(--md-out); }

/* ── Automático ── */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --md-bg:       #0F0F0F;
        --md-surf:     #1C1C1E;
        --md-surf-1:   #252527;
        --md-surf-2:   #2A2A2C;
        --md-surf-3:   #303032;
        --md-on-surf:  #E6E1E5;
        --md-on-surf-v:#938F99;
        --md-out:      rgba(255,255,255,0.12);
        --md-out-v:    rgba(255,255,255,0.06);
    }
}

@media (prefers-color-scheme: light) {
    [data-theme="auto"] {
        --md-bg:       #F3EFF4;
        --md-surf:     #FFFBFE;
        --md-surf-1:   #F7F2FA;
        --md-surf-2:   #ECE6F0;
        --md-surf-3:   #E6E0EC;
        --md-on-surf:  #1C1B1F;
        --md-on-surf-v:#49454F;
        --md-out:      rgba(0,0,0,0.12);
        --md-out-v:    rgba(0,0,0,0.06);
        --elev-1: 0 2px 4px rgba(0,0,0,.24), 0 1px 2px rgba(0,0,0,.20);
        --elev-2: 0 4px 8px rgba(0,0,0,.22), 0 2px 4px rgba(0,0,0,.18);
        --elev-3: 0 8px 16px rgba(0,0,0,.20), 0 4px 6px rgba(0,0,0,.16);
        --elev-4: 0 12px 24px rgba(0,0,0,.18), 0 6px 8px rgba(0,0,0,.14);
        --elev-5: 0 20px 40px rgba(0,0,0,.16), 0 10px 12px rgba(0,0,0,.12);
    }
    [data-theme="auto"] .sf-topic-card:hover::before { opacity: 0.03 !important; }
    [data-theme="auto"] .sf-navbar  { background: var(--md-surf) !important; }
    [data-theme="auto"] .sf-sidenav { background: var(--md-surf) !important; }
    [data-theme="auto"] .sf-footer  { background: var(--md-surf); }
    [data-theme="auto"] .sf-hero, [data-theme="auto"] .sf-hero-compact { background: var(--md-surf-1); border-bottom-color: var(--md-out); }
    [data-theme="auto"] .cat-label-tech     { background: rgba(33,150,243,0.12);  color: #1565C0; }
    [data-theme="auto"] .cat-label-ai       { background: rgba(124,77,255,0.12);  color: #4527A0; }
    [data-theme="auto"] .cat-label-games    { background: rgba(255,152,0,0.12);   color: #E65100; }
    [data-theme="auto"] .cat-label-f1       { background: rgba(229,57,53,0.12);   color: #B71C1C; }
    [data-theme="auto"] .cat-label-futebol  { background: rgba(0,200,83,0.12);    color: #1B5E20; }
    [data-theme="auto"] .cat-label-brasil   { background: rgba(255,214,0,0.18);   color: #F57F17; }
    [data-theme="auto"] .cat-label-mundo    { background: rgba(96,125,139,0.14);  color: #37474F; }
    [data-theme="auto"] .cat-label-negocios { background: rgba(0,150,136,0.12);   color: #004D40; }
    [data-theme="auto"] .cat-label-economia { background: rgba(0,150,136,0.12);   color: #004D40; }

    /* Per-category chip colors — auto (light) */
    [data-theme="auto"] [data-cat="tech"].sf-chip:hover,     [data-theme="auto"] [data-cat="tech"].sf-chip.active     { background: rgba(33,150,243,0.12) !important;  color: #1565C0 !important;  border-color: #1565C0 !important; }
    [data-theme="auto"] [data-cat="ai"].sf-chip:hover,       [data-theme="auto"] [data-cat="ai"].sf-chip.active       { background: rgba(124,77,255,0.12) !important;  color: #4527A0 !important;  border-color: #4527A0 !important; }
    [data-theme="auto"] [data-cat="games"].sf-chip:hover,    [data-theme="auto"] [data-cat="games"].sf-chip.active    { background: rgba(255,152,0,0.12) !important;   color: #E65100 !important;  border-color: #E65100 !important; }
    [data-theme="auto"] [data-cat="f1"].sf-chip:hover,       [data-theme="auto"] [data-cat="f1"].sf-chip.active       { background: rgba(229,57,53,0.12) !important;   color: #B71C1C !important;  border-color: #B71C1C !important; }
    [data-theme="auto"] [data-cat="futebol"].sf-chip:hover,  [data-theme="auto"] [data-cat="futebol"].sf-chip.active  { background: rgba(0,200,83,0.12) !important;    color: #1B5E20 !important;  border-color: #1B5E20 !important; }
    [data-theme="auto"] [data-cat="brasil"].sf-chip:hover,   [data-theme="auto"] [data-cat="brasil"].sf-chip.active   { background: rgba(255,214,0,0.18) !important;   color: #F57F17 !important;  border-color: #F57F17 !important; }
    [data-theme="auto"] [data-cat="mundo"].sf-chip:hover,    [data-theme="auto"] [data-cat="mundo"].sf-chip.active    { background: rgba(96,125,139,0.14) !important;  color: #37474F !important;  border-color: #37474F !important; }
    [data-theme="auto"] [data-cat="negocios"].sf-chip:hover, [data-theme="auto"] [data-cat="negocios"].sf-chip.active { background: rgba(0,150,136,0.12) !important;   color: #004D40 !important;  border-color: #004D40 !important; }
}

/* ══════════ ANIMAÇÕES ══════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════ RESPONSIVO ══════════ */
@media (max-width: 600px) {
    .section-title    { font-size: 1.3rem; }
    .subsection-title { font-size: 1rem; }
    .sf-modal         { max-width: 95% !important; border-radius: var(--shape-lg) !important; }
    .sf-modal-project { width: 96% !important; }
    .sf-table-wrapper { overflow-x: auto; }
}

/* Elementos mobile ocultos no desktop */
#mob-topbar, #mob-logo, #mob-theme-btn { display: none; }
.mob-fab { display: none; }

/* ══════════ MOBILE (≤ 768px) ══════════ */
@media (max-width: 768px) {
    /* 1. Navbar e sidenav ocultos */
    .sf-navbar,
    .sf-sidenav { display: none !important; }

    /* Barra de topo mobile */
    #mob-topbar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--md-bg);
        z-index: 998;
        transition: opacity 250ms ease, transform 250ms ease;
    }
    #mob-topbar.mob-header-hidden {
        opacity: 0;
        transform: translateY(-100%);
        pointer-events: none;
    }

    /* Transição de esconder ao rolar */
    #mob-logo, #mob-theme-btn {
        transition: opacity 250ms ease, transform 250ms ease;
    }
    #mob-logo.mob-header-hidden {
        opacity: 0;
        transform: translateX(-50%) translateY(-12px);
        pointer-events: none;
    }
    #mob-theme-btn.mob-header-hidden {
        opacity: 0;
        transform: translateY(-12px);
        pointer-events: none;
    }

    /* Logo SF Labs — elemento direto do body, sem herança de overflow */
    #mob-logo {
        display: flex;
        position: fixed;
        top: 10px;
        left: 20%;
        transform: translateX(-50%);
        z-index: 999;
        align-items: center;
        text-decoration: none;
        height: 56px;
        overflow: hidden;
        padding: 0 10px;
    }
    #mob-logo img {
        height: 90px;
        width: auto;
        margin-top: -8px;
        margin-bottom: -8px;
    }

    /* Botão de tema — elemento direto do body */
    #mob-theme-btn {
        position: fixed;
        top: 20px;
        right: 7%;
        z-index: 999;
        background: transparent;
        border: none;
        color: var(--md-on-surf);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 250ms ease, transform 250ms ease;
    }
    #mob-theme-btn:active { background: var(--md-pri-state); }
    #mob-theme-btn .material-icons { font-size: 22px; }

    /* 2. Sem overflow horizontal */
    html, body { overflow-x: hidden; }

    /* 3. Oculta hero (logo circular + subtítulo) */
    .sf-hero-compact { display: none !important; }

    /* 4. Padding lateral máximo de 12px nos containers */
    .container { padding-left: 12px !important; padding-right: 12px !important; }
    .section   { padding-top: 16px; padding-bottom: 16px; }

    /* ── FAB Mobile ── */
    .mob-fab {
        display: flex;
        flex-direction: column;
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 1000;
        background: var(--md-pri);
        border-radius: 28px;
        /* sem overflow:hidden — o background fica confinado ao border-radius via
           background-clip:border-box (padrão); overflow:hidden cortava o trigger no rotate(90deg) */
        width: 56px;
        box-shadow: 0 6px 10px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
        transition: border-radius 250ms ease-in-out,
                    box-shadow 250ms ease-in-out;
    }
    .mob-fab.open {
        border-radius: 16px;
        width: auto;
        box-shadow: 0 8px 20px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.3);
    }

    /* Botão gatilho */
    .mob-fab-trigger {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: transparent;
        border: none;
        box-shadow: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        align-self: flex-end;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
        transition: transform 300ms ease;
    }
    #mob-fab.open .mob-fab-trigger {
        transform: rotate(90deg);
    }

    /* Ícone hambúrguer */
    .fab-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 18px;
        gap: 5px;
    }
    .fab-bar {
        display: block;
        width: 24px;
        height: 2px;
        background: #1a1a1a;
        border-radius: 2px;
        transition: transform 300ms ease, opacity 300ms ease;
        flex-shrink: 0;
    }
    #mob-fab.open .fab-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    #mob-fab.open .fab-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
    #mob-fab.open .fab-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Menu interno (revelado ao expandir)
       padding lateral sempre presente (não afeta height);
       padding vertical só no estado open (transicionado) — evita o gap acima do trigger */
    .mob-fab-menu {
        width: auto;
        max-height: 0;
        overflow: hidden;
        padding: 0 20px 0 16px;
        transition: max-height 250ms ease-in-out,
                    padding-top 250ms ease-in-out,
                    padding-bottom 250ms ease-in-out;
    }
    .mob-fab.open .mob-fab-menu {
        max-height: 400px;
        padding: 8px 20px 8px 16px;
    }

    .mob-fab-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        background: transparent;
        border: none;
        color: var(--md-pri-on);
        font-size: 14px;
        font-family: 'Roboto', sans-serif;
        padding: 10px 0;
        cursor: pointer;
        text-align: left;
        white-space: nowrap;
        transition: background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .mob-fab-item:active { background: rgba(0,0,0,0.12); }
    .mob-fab-item .material-icons { font-size: 18px; color: var(--md-pri-on); opacity: 0.75; flex-shrink: 0; }

    .mob-fab-divider {
        height: 1px;
        background: rgba(0,0,0,0.15);
        margin: 4px 0;
    }

    /* ── Highlights Carousel ── */
    #highlights-container.hl-carousel-active {
        margin: 0;
        overflow: visible;
    }

    .hl-carousel-wrap {
        position: relative;
        overflow: hidden;
        width: 92%;
        margin: 0 auto;
    }

    .hl-carousel-track {
        display: flex;
        will-change: transform;
        transition: transform 300ms ease;
    }

    .hl-carousel-slide {
        flex: 0 0 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 4px 2px 8px;
    }

    .hl-carousel-slide .sf-highlight-card {
        opacity: 1 !important;
        transform: none !important;
        height: auto;
        min-height: 160px;
    }

    .hl-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255,255,255,0.1);
        border: none;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        padding: 0;
        transition: background 0.2s, opacity 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .hl-arrow:active { background: rgba(255,255,255,0.2); }
    .hl-arrow .material-icons { font-size: 20px; }
    .hl-arrow-prev { left: -36px; }
    .hl-arrow-next { right: -36px; }
    .hl-arrow[disabled] { opacity: 0.25; pointer-events: none; }

    .hl-carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin-top: 14px;
    }

    .hl-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255,255,255,0.3);
        transition: background 0.2s, transform 0.2s;
        cursor: pointer;
    }
    .hl-dot.active {
        background: var(--md-pri);
        transform: scale(1.25);
    }
}
