/* =========================================
   1. VARIÁVEIS E RESET GLOBAL
   ========================================= */
:root {
    /* Cores da Marca */
    --fn-green: #67c425;
    --fn-neon-green: #7fff00;
    --fn-yellow: #ffe63b;
    --fn-white: #ffffff;
    --fn-black: #050505;
    --fn-dark: #121212;
    --fn-gray: #b0b0b0;

    /* Variáveis Semânticas (Dark Mode Padrão - Ajustado) */
    --bg-body: #0a0a0a;
    /* Mais profundo que #050505 */
    --bg-sidebar: #0f0f0f;
    /* Flat e sólido */
    --bg-card: #141414;
    /* Contraste suave com o body */
    --bg-input: #1a1a1a;
    /* Input distinguível */
    --bg-modal: #141414;
    --text-main: #e0e0e0;
    /* Off-white para menos fadiga visual */
    --text-muted: #888888;
    --border-color: #2a2a2a;
    /* Bordas sutis */
    --glass-bg: rgba(20, 20, 20, 0.95);
    /* Legado/Backdrop */
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.6);

    /* Gradiente Padrão Dark */
    --card-gradient: linear-gradient(160deg, #141414 0%, #1a1f1a 100%);
}

/* =========================================
   CONFIGURAÇÃO REAL DO LIGHT MODE (MODERNIZADO)
   ========================================= */
[data-theme="light"] {
    --bg-body: #f4f6f8;
    /* Cinza levemente azulado para modernidade */
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    /* Card branco puro para limpeza */
    --bg-input: #f8f9fa;
    --bg-modal: #ffffff;

    --text-main: #2c3e50;
    /* Azul escuro sólido para texto principal */
    --text-muted: #64748b;
    /* Cinza azulado para secundário */

    --border-color: #e2e8f0;
    /* Borda visível mas suave */

    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(0, 0, 0, 0.08);
    /* Borda mais definida */
    --shadow-color: rgba(60, 64, 67, 0.1);
    /* Sombra google styled */

    --fn-white: #2c3e50;
    --fn-black: #ffffff;

    --card-gradient: linear-gradient(135deg, #ffffff 0%, #f8fcf8 100%);

    /* Inversão para ícones brancos ficarem visíveis */
    --fn-invert: invert(0.8);
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    background-color: var(--bg-body);

    /* Fundo Dark Padrão com Imagem */
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.6) 0%, #050505 80%), url('../images/background.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: top center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;

    /* CORREÇÃO: Removemos padding-top do body para evitar buracos no admin */
    margin: 0;
    padding: 0;
}

/* Remove a imagem de fundo escura no Light Mode */
[data-theme="light"] body {
    background: var(--bg-body) !important;
    background-image: none !important;
}

/* =========================================
   2. TIPOGRAFIA
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.text-gradient {
    background: linear-gradient(90deg, var(--fn-green), var(--fn-yellow));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.display-title {
    font-size: 3.5rem;
    line-height: 1.1;
    text-shadow: 2px 2px 10px rgba(146, 255, 233, 0.672);
}

/* =========================================
   2.1. CORES UTILITÁRIAS (BRAND)
   ========================================= */
.text-green {
    color: var(--fn-green) !important;
}

.text-yellow {
    color: var(--fn-yellow) !important;
}

.text-neon {
    color: var(--fn-neon-green) !important;
}

.text-white {
    color: var(--fn-white) !important;
}

.text-secondary {
    color: var(--text-muted) !important;
}

.bg-green {
    background-color: var(--fn-green) !important;
    color: #000;
}

.bg-yellow {
    background-color: var(--fn-yellow) !important;
    color: #000;
}

.bg-green-soft {
    background-color: rgba(103, 196, 37, 0.15) !important;
    color: var(--fn-green) !important;
    border: 1px solid rgba(103, 196, 37, 0.3);
}

.bg-yellow-soft {
    background-color: rgba(255, 230, 59, 0.15) !important;
    color: var(--fn-yellow) !important;
    border: 1px solid rgba(255, 230, 59, 0.3);
}

.border-green {
    border-color: var(--fn-green) !important;
}

.border-yellow {
    border-color: var(--fn-yellow) !important;
}

/* =========================================
   3. NAVBAR & LOGO
   ========================================= */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    transition: all 0.4s ease;
    height: 100px;
    /* Aumentei levemente para acomodar melhor a logo */
    position: fixed;
    /* Header fixo no site público */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
}

.nav-link {
    color: var(--fn-white) !important;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 10px;
    position: relative;
    transition: 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--fn-yellow);
    transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
    font-weight: 600;
    color: var(--fn-yellow) !important;
    text-shadow: 0 0 10px rgba(255, 230, 59, 0.5);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.brand-logo {
    transition: all 0.3s ease;
    display: block;
}

.navbar-brand:hover .brand-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 5px rgba(103, 196, 37, 0.5));
}

/* Desktop */
@media (min-width: 992px) {
    .navbar-brand {
        position: absolute;
        top: 0;
        left: 5%;
        z-index: 1000;
        padding: 0;
        margin: 0;
    }

    .brand-logo {
        height: 140px;
        filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.5));
    }

    .navbar-collapse {
        justify-content: flex-end;
    }
}

/* Mobile */
@media (max-width: 991px) {
    .navbar {
        height: auto;
        padding: 15px 0;
        position: fixed;
    }

    .navbar-brand {
        position: relative;
        margin-right: auto;
        z-index: 1001;
    }

    .brand-logo {
        height: 70px;
        width: auto;
        max-width: 200px;
        object-fit: contain;
    }

    .navbar-collapse {
        background-color: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(10px);
        padding: 25px;
        border-radius: 15px;
        margin-top: 15px;
        border: 1px solid rgba(103, 196, 37, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    }

    .nav-item {
        margin-bottom: 12px;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 5px;
    }

    .nav-item:last-child {
        border-bottom: none;
        margin-top: 15px;
    }

    .btn-primary {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }

    /* DROPDOWN MOBILE SPECIFIC */
    .dropdown-menu {
        background-color: transparent !important;
        border: 1px solid rgba(103, 196, 37, 1);
        box-shadow: none !important;
        padding-left: 0;
        margin-top: 5px;
        text-align: center;
    }
}

/* GLOBAL DROPDOWN STYLES (Desktop & Mobile Base) */
.dropdown-menu {
    border-radius: 15px;
    padding: 10px;
    background-color: rgba(5, 5, 5, 0.95);
    /* Fallback for desktop */
}

@media (min-width: 992px) {
    .dropdown-menu {
        background-color: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(103, 196, 37, 1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
        min-width: 220px;
        margin-top: 15px;
    }

    /* Seta apontando para cima no desktop */
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 20px;
        width: 15px;
        height: 15px;
        background-color: rgba(5, 5, 5, 0.95);
        transform: rotate(45deg);
        border-top: 1px solid rgba(103, 196, 37, 1);
        border-left: 1px solid rgba(103, 196, 37, 1);
    }
}

.dropdown-item {
    color: var(--text-muted) !important;
    padding: 12px 20px;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 2px;
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(103, 196, 37, 0.1) !important;
    color: var(--fn-green) !important;
    transform: translateX(5px);
    padding-left: 25px;
    /* Slight jump effect */
}

.dropdown-item:active,
.dropdown-item.active {
    background-color: rgba(103, 196, 37, 0.2) !important;
    /* Green subtle background */
    color: var(--fn-green) !important;
    font-weight: 700;
}

/* Dropdown Arrow Animation & Visibility Fix */
.nav-link.dropdown-toggle::after {
    /* Reset nav-link underline properties */
    position: static !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;

    /* Apply Arrow Styles */
    display: inline-block !important;
    margin-left: 0.5em;
    vertical-align: middle;
    content: "\f282" !important;
    /* Bootstrap Icons Chevron Down */
    font-family: 'bootstrap-icons' !important;
    border: none !important;
    color: var(--fn-green) !important;
    font-size: 0.8em;
    font-weight: bold;
    transition: transform 0.3s ease;
}

/* Prevent underline expansion on hover for dropdown toggle */
.nav-link.dropdown-toggle:hover::after,
.nav-link.dropdown-toggle.active::after {
    width: auto !important;
    background-color: transparent !important;
}

.nav-item.dropdown .show .nav-link.dropdown-toggle::after {
    transform: rotate(180deg);
}

@media (max-width: 380px) {
    .brand-logo {
        height: 60px;
    }
}

/* =========================================
   4. ELEMENTOS DE UI (Botões, Cards, Forms)
   ========================================= */
.btn-primary {
    background: var(--fn-green);
    border: none;
    color: #000;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    padding: 12px 35px;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--fn-yellow);
    z-index: -1;
    transition: width 0.4s;
}

.btn-primary:hover {
    color: #000;
    box-shadow: 0 0 20px rgba(103, 196, 37, 0.6);
    transform: translateY(-3px);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-outline-light {
    border: 2px solid var(--fn-white);
    border-radius: 50px;
    padding: 10px 30px;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    color: var(--fn-white);
}

.btn-outline-light:hover {
    background: var(--fn-white);
    color: var(--bg-body);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.card-custom {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    height: 100%;
}

.card-custom:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--fn-green);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(103, 196, 37, 0.2);
}

.form-control {
    background-color: var(--bg-input);
    border: 1px solid #444;
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 10px;
}

.form-control:focus {
    background-color: var(--bg-input);
    border-color: var(--fn-green);
    color: var(--text-main);
    box-shadow: 0 0 0 0.25rem rgba(103, 196, 37, 0.25);
}

.input-group-text {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Global focus-within support for buttons in input groups */
.input-group:focus-within .btn {
    border-color: var(--fn-green);
    box-shadow: 0 0 0 0.25rem rgba(103, 196, 37, 0.25);
    z-index: 3;
    /* Ensure it stays above adjacent elements */
}

/* =========================================
   5. SEÇÕES & LAYOUT (PÚBLICO)
   ========================================= */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 160px !important;
    /* REFORÇADO PARA DESKTOP */
    /* Compensa o header fixo na Home */
    padding-bottom: 60px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--fn-black), transparent);
}

section.bg-dark,
section.bg-black,
.footer-section,
section.py-5 {
    background-color: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* CLASSE UNIFICADA PARA CONTEÚDO DE PÁGINA (PÚBLICO) */
/* Aplique esta classe nas seções principais de cardapio.php, unidades.php, cupons.php */
.page-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* ESPAÇAMENTO HARMÔNICO DEFINITIVO */
    padding-top: 160px !important;
}

/* =========================================
   6. FOOTER
   ========================================= */
.footer-section {
    position: relative;
    padding-top: 80px;
    padding-bottom: 40px;
    margin-top: auto;
    background-color: #080808;
    overflow: hidden;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--fn-green), transparent);
    box-shadow: 0 0 20px rgba(103, 196, 37, 0.5);
}

.footer-title {
    font-family: 'Oswald', sans-serif;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

.footer-title::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--fn-green);
    margin-top: 8px;
    transition: width 0.3s;
}

.col-lg-2:hover .footer-title::after {
    width: 50px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--fn-yellow);
    transform: translateX(5px);
    text-shadow: 0 0 8px rgba(255, 230, 59, 0.3);
}

.social-btn {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s;
    font-size: 1.2rem;
}

.social-btn:hover {
    background-color: var(--fn-green);
    color: #000;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(103, 196, 37, 0.4);
    border-color: var(--fn-green);
}

.footer-newsletter {
    position: relative;
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.footer-newsletter:hover {
    transform: translateY(-5px);
    border-color: rgba(103, 196, 37, 0.3) !important;
}

.footer-legal {
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-legal:hover {
    color: #fff;
}

@media (max-width: 991px) {
    .footer-section {
        padding-top: 60px;
        text-align: left;
    }
}

@media (max-width: 767px) {
    .footer-section {
        text-align: center;
    }

    .footer-title::after {
        margin: 8px auto 0;
    }

    .footer-links a {
        padding: 5px 0;
        justify-content: center;
    }
}

/* =========================================
   7. ADMIN SIDEBAR & LAYOUT (CORRIGIDO DEFINITIVO)
   ========================================= */
.admin-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg-body);
    transition: background-color 0.3s ease;
    margin: 0;
    padding: 0;
}

.sidebar {
    min-width: 280px;
    max-width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: fixed;
    height: 100vh;
    z-index: 1050;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* BOTÃO DE FECHAR SIDEBAR (MOBILE) */
.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-close-btn:hover {
    background-color: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
    transform: rotate(90deg);
}

.sidebar-close-btn i {
    font-size: 1.2rem;
}

.sidebar-logo {
    height: 100px;
    filter: drop-shadow(0 0 5px rgba(103, 196, 37, 0.3));
}

.sidebar-menu {
    padding: 20px 15px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: 12px;
    transition: 0.3s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background-color: rgba(103, 196, 37, 0.1);
    color: var(--text-main);
    border-color: rgba(103, 196, 37, 0.2);
    transform: translateX(5px);
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: var(--fn-green);
    text-shadow: 0 0 10px rgba(103, 196, 37, 0.6);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--fn-green);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Oswald', sans-serif;
}

/* ÁREA DE CONTEÚDO ADMIN */
.admin-content {
    width: 100%;
    margin-left: 280px;
    padding: 30px;
    transition: all 0.3s;

    /* ESPAÇAMENTO HARMÔNICO DEFINITIVO (160px para alinhar com o site) */
    margin-top: 0 !important;
    padding-top: 40px !important;
}

/* EFEITO GLASSMORPHISM (REMOVIDO - AGORA SOLID) */
.glass-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 6px var(--shadow-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--fn-green) !important;
    box-shadow: 0 10px 20px var(--shadow-color);
}

.glass-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Z-INDEX HIERARCHY CORRECTED */
.mobile-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    /* Abaixo do Overlay e Sidebar */
    background: #000 !important;
    /* Fundo Sólido Limpo */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: none;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Responsividade Sidebar */
@media (max-width: 991px) {
    .sidebar {
        margin-left: -280px;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
        z-index: 1060;
        /* Acima de tudo */
    }

    .sidebar.active {
        margin-left: 0;
    }

    .admin-content {
        margin-left: 0;
        padding: 120px 20px 20px 20px;
        /* Top Right Bottom Left */
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.8);
        z-index: 1050;
        /* Entre Header e Sidebar */
        top: 0;
        left: 0;
        backdrop-filter: blur(5px);
    }

    .sidebar-overlay.active {
        display: block;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--fn-black);
}

::-webkit-scrollbar-thumb {
    background: var(--fn-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--fn-yellow);
}

/* =========================================
   9. ADMIN SIDEBAR COMPONENTS (MIGRADO)
   ========================================= */
.sidebar-footer {
    padding: 20px;
    background: transparent;
    border-top: none;
}

.user-profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px;
    transition: all 0.3s ease;
}

.user-profile-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar-glow {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--fn-green, #67c425), #4a9c15);
    color: #000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Oswald', sans-serif;
    box-shadow: 0 0 10px rgba(103, 196, 37, 0.3);
}

.btn-logout {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    transition: all 0.2s;
    text-decoration: none;
}

.btn-logout:hover {
    background: #ff4d4d;
    color: white;
    transform: scale(1.1);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--fn-neon-green, #00ff00);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 5px var(--fn-neon-green, #00ff00);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* --- TEMA (DARK/LIGHT TOGGLE) --- */
.btn-theme-toggle {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-theme-toggle {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

#themeIcon {
    transition: color 0.3s ease, transform 0.3s ease;
}

#themeIcon.bi-moon-stars-fill {
    color: var(--fn-white);
}

.btn-theme-toggle:hover #themeIcon.bi-moon-stars-fill {
    color: var(--fn-neon-green);
    transform: rotate(-15deg);
    text-shadow: 0 0 8px var(--fn-neon-green);
}

#themeIcon.bi-sun-fill {
    color: var(--fn-black);
}

[data-theme="light"] #themeIcon.bi-sun-fill {
    color: #000 !important;
}

.btn-theme-toggle:hover #themeIcon.bi-sun-fill {
    color: var(--fn-yellow);
    transform: rotate(45deg);
    text-shadow: 0 0 8px var(--fn-yellow);
}

/* =========================================================
   10. CORREÇÕES DE FORÇA (OVERRIDES) PARA LIGHT MODE
   ========================================================= */
[data-theme="light"] .admin-content,
[data-theme="light"] section.bg-dark,
[data-theme="light"] section.bg-black,
[data-theme="light"] .footer-section {
    background-color: transparent !important;
    backdrop-filter: none;
    border: none;
}

[data-theme="light"] .text-white:not(.btn):not(.badge):not(.sidebar-link) {
    color: #212529 !important;
}

[data-theme="light"] .card.bg-black,
[data-theme="light"] .bg-black {
    background: var(--card-gradient) !important;
    border: none !important;
    color: #000 !important;
    box-shadow: 0 10px 20px rgba(103, 196, 37, 0.3);
}

[data-theme="light"] .card.bg-black h1,
[data-theme="light"] .card.bg-black h2,
[data-theme="light"] .card.bg-black h3,
[data-theme="light"] .bg-black h1,
[data-theme="light"] .bg-black h2 {
    color: #000 !important;
    text-shadow: none !important;
}

[data-theme="light"] input.form-control,
[data-theme="light"] select.form-control,
[data-theme="light"] textarea.form-control {
    background-color: #ffffff !important;
    color: #333 !important;
    border-color: #ced4da !important;
}

[data-theme="light"] .form-control:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 0.25rem rgba(103, 196, 37, 0.25) !important;
}

[data-theme="light"] .bg-dark {
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #dee2e6 !important;
}

[data-theme="light"] .table {
    color: #212529 !important;
    border-color: #dee2e6;
}

[data-theme="light"] .table-dark {
    background-color: #fff !important;
    color: #212529 !important;
}

[data-theme="light"] .table thead th {
    background-color: #f1f3f5 !important;
    color: #000 !important;
    border-bottom: 2px solid var(--fn-green);
}

[data-theme="light"] .table tbody td {
    background-color: #fff !important;
    border-bottom: 1px solid #eee;
    color: #333 !important;
}

[data-theme="light"] .sidebar {
    background: #fff !important;
    border-right: 1px solid #eee;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-link {
    color: #555 !important;
}

[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active {
    background-color: rgba(103, 196, 37, 0.15) !important;
    color: #000 !important;
}

[data-theme="light"] .sidebar-link i {
    color: var(--fn-green);
}

.btn-theme-toggle {
    width: 32px;
    height: 32px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .btn-theme-toggle {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

#themeIcon.bi-moon-stars-fill {
    color: var(--fn-white);
}

.btn-theme-toggle:hover #themeIcon.bi-moon-stars-fill {
    color: var(--fn-neon-green);
    text-shadow: 0 0 8px var(--fn-neon-green);
}

[data-theme="light"] #themeIcon.bi-sun-fill {
    color: #000 !important;
}

[data-theme="light"] .btn-theme-toggle:hover #themeIcon.bi-sun-fill {
    color: var(--fn-yellow) !important;
    text-shadow: 0 0 8px var(--fn-yellow);
}

/* =========================================================
   9. CORREÇÕES DE HOVER (LIGHT MODE)
   ========================================================= */
[data-theme="light"] .sidebar-link:hover,
[data-theme="light"] .sidebar-link.active {
    background-color: rgba(103, 196, 37, 0.15) !important;
    color: #000 !important;
    border-color: rgba(103, 196, 37, 0.3) !important;
}

[data-theme="light"] .sidebar-link:hover i,
[data-theme="light"] .sidebar-link.active i {
    color: var(--fn-green) !important;
    transform: scale(1.1);
}

[data-theme="light"] .btn-outline-light {
    color: #333 !important;
    border-color: #ccc !important;
}

[data-theme="light"] .btn-outline-light:hover {
    background-color: var(--fn-green) !important;
    color: #fff !important;
    border-color: var(--fn-green) !important;
}

[data-theme="light"] .btn-hover-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

[data-theme="light"] .card-custom:hover {
    box-shadow: 0 10px 30px rgba(103, 196, 37, 0.2) !important;
    border-color: var(--fn-green) !important;
}

[data-theme="light"] .table-hover>tbody>tr:hover>* {
    background-color: rgba(103, 196, 37, 0.15) !important;
    color: #000 !important;
    box-shadow: inset 0 0 0 9999px rgba(103, 196, 37, 0.15) !important;
}

/* =========================================================
   10. RESPONSIVIDADE E AJUSTES FINAIS
   ========================================================= */
/* =========================================================
   10. RESPONSIVIDADE E AJUSTES FINAIS
   ========================================================= */
@media (max-width: 991px) {

    /* Mobile: Padronização do topo para Admin e Público */
    .admin-content {
        padding-top: 120px !important;
        /* Reduzi levemente para mobile */
    }

    .display-title {
        font-size: 2.2rem;
    }

    h1 {
        font-size: 2.5rem;
        /* Ajustado para caber melhor */
    }

    h2 {
        font-size: 1.8rem;
    }

    .display-3 {
        font-size: 2.5rem !important;
        /* Força tamanho menor no título principal */
    }

    .hero-section,
    header,
    .page-content {
        text-align: center;
        padding-top: 140px !important;
        /* AUMENTADO PARA GARANTIR VISIBILIDADE */
        padding-bottom: 60px;
        min-height: auto !important;
        height: auto !important;
        margin-top: 0 !important;
    }

    .hero-section img,
    header img.floating-logo {
        margin-top: 20px;
        max-width: 60%;
        height: auto;
    }

    .card-custom {
        margin-bottom: 20px;
    }

    .row.g-4>[class*="col-"] {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .display-title {
        font-size: 1.8rem;
    }

    .display-3 {
        font-size: 2rem !important;
    }

    .btn-primary {
        width: 100%;
        display: block;
        margin-bottom: 10px;
    }

    /* Ajuste fino para não vazar tela */
    body {
        overflow-x: hidden;
    }
}

/* =========================================
   11. FLIP CARD 3D
   ========================================= */
.flip-container {
    perspective: 1000px;
    width: 100%;
    max-width: 400px;
    height: 250px;
    margin: 0 auto;
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-container.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    top: 0;
    left: 0;
}

.flip-front {
    z-index: 2;
    transform: rotateY(0deg);
    pointer-events: auto;
}

.flip-back {
    transform: rotateY(180deg);
    z-index: 1;
    pointer-events: none;
}

.flip-container.flipped .flip-front {
    pointer-events: none;
}

.flip-container.flipped .flip-back {
    pointer-events: auto;
}

.card-structure {
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.card-logo-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 120%;
    height: 120%;
    background-image: url('../images/logo.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    opacity: 1;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.92);
    z-index: 1;
}

.card-content {
    position: relative;
    z-index: 2;
}

.btn-flip {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.btn-flip:hover {
    background: var(--fn-green);
    color: #000;
    transform: rotate(180deg);
}

/* =========================================
   12. CORREÇÃO DE BOTÕES (RESPONSIVIDADE)
   ========================================= */
@media (max-width: 768px) {

    .hero-buttons .btn,
    .cta-buttons .btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 10px;
    }

    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }

    .display-3 {
        font-size: 2.5rem;
    }

    .display-4 {
        font-size: 2rem;
    }
}

/* =========================================
   13. ALINHAMENTO DE TÍTULOS (GLOBAL)
   ========================================= */
.header-spacer {
    margin-top: 1rem;
}

@media (max-width: 991px) {
    .header-spacer {
        margin-top: 2rem;
    }
}

/* =========================================
   14. FILTROS DE CATEGORIA (BOTÕES MODERNOS)
   ========================================= */
.category-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 10px;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 50px;
}

.cat-btn i {
    color: #666;
    transition: 0.3s;
}

.cat-btn span {
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.cat-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cat-btn:hover i {
    color: #fff;
}

/* Active State */
.cat-btn.active {
    background-color: var(--cat-color, #67c425);
    border-color: var(--cat-color, #67c425);
    color: #000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.cat-btn.active i {
    color: #000;
}

/* Mobile Horizontal Scroll */
@media (max-width: 991px) {
    .category-wrapper {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-left: 20px;
        padding-right: 20px;
        gap: 10px;
    }

    .category-wrapper::-webkit-scrollbar {
        display: none;
    }

    .cat-btn {
        flex: 0 0 auto;
        scroll-snap-align: center;
        background-color: #111;
        padding: 10px 20px;
        white-space: nowrap;
    }
}

/* =========================================
   15. PRODUTOS (CARDÁPIO)
   ========================================= */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(103, 196, 37, 0.15) !important;
    border: 1px solid #333 !important;
}

.price-gradient {
    background: linear-gradient(90deg, #67c425, #ffe63b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(103, 196, 37, 0.2);
}

/* =========================================
   8. NEW DESIGN SYSTEM (2026 REFRESH)
   ========================================= */

/* Glassmorphism 2.0 */
.glass-card {
    background: rgba(20, 20, 20, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    border-radius: 24px !important;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(103, 196, 37, 0.3) !important;
}

/* Page Header Standard */
.page-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    margin: 0;
    line-height: 1;
    text-transform: uppercase;
    color: var(--fn-white);
}

.page-subtitle {
    font-family: 'Outfit', sans-serif;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Stats Card Modern */
.card-stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-stat::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(103, 196, 37, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}

.stat-label {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Modern Tables */
.table-modern {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-main);
    border-collapse: separate;
    border-spacing: 0 8px;
    /* Row Gap */
}

.table-modern thead th {
    border: none;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    padding: 0 1rem 1rem 1rem;
}

.table-modern tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.table-modern tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-modern tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.table-modern tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.005);
}

.table-modern td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

/* Badge Refinements */
.badge-modern {
    padding: 0.5em 1em;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* =========================================
   16. FIXES DE RESPONSIVIDADE (ADMIN)
   ========================================= */
@media (max-width: 991px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    .page-header>div {
        width: 100%;
    }

    .page-header .btn {
        width: 100%;
        /* Botão full width no mobile */
        margin-top: 10px;
    }

    /* Reduzir padding dos cards no mobile */
    .glass-card {
        padding: 1.5rem !important;
    }

    /* Remover escalas em tabelas no mobile para evitar overflow */
    .table-modern tbody tr:hover {
        transform: none !important;
    }

    /* Ajuste para inputs não quebrarem layout */
    .input-group {
        flex-wrap: nowrap;
    }

    .admin-content {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}