/* ==============================================================
   Fabrica da Carne - folha de estilos principal
   Secoes: variaveis, base, botoes, cards, admin (com menu
   lateral), landing, assistente do churrasco, acesso da TV (WebView)
   ============================================================== */

/* --------------------------------------------------------------
   Variaveis
   -------------------------------------------------------------- */
:root {
    --gold: #d4a437;
    --gold-light: #f5d06f;
    --gold-dark: #9c7420;
    --black: #0d0d0d;
    --charcoal: #1a1a1a;
    --red: #b3261e;
    --grad-gold: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
}

/* --------------------------------------------------------------
   Base e utilitarios
   -------------------------------------------------------------- */
body {
    font-family: 'Inter', system-ui, sans-serif;
}

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

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

.bg-dark-texture {
    background: radial-gradient(circle at 50% 30%, #2a2a2a, var(--black) 70%);
    color: #eee;
}

/* --------------------------------------------------------------
   Botoes
   -------------------------------------------------------------- */
.btn-gold {
    background: var(--grad-gold);
    color: var(--black);
    font-weight: 600;
    border: 0;
}

.btn-gold:hover {
    filter: brightness(1.1);
    color: var(--black);
}

.btn-outline-gold {
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 600;
}

.btn-outline-gold:hover {
    background: var(--gold);
    color: var(--black);
}

/* --------------------------------------------------------------
   Card escuro (login)
   -------------------------------------------------------------- */
.card-dark {
    background: var(--charcoal);
    border: 1px solid #333;
    color: #eee;
}

.card-dark .form-control {
    background: #111;
    border-color: #444;
    color: #fff;
}

/* --------------------------------------------------------------
   Admin
   -------------------------------------------------------------- */
.admin {
    background: #f4f2ee;
}

.card-stat {
    border-left: 4px solid var(--gold);
}

/* Layout com menu lateral */
.ad-layout {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.ad-conteudo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ad-main {
    flex: 1;
    padding: 1.5rem .75rem 2.5rem;
}

/* Menu lateral (no desktop e fixo; no celular vira offcanvas) */
.ad-sidebar {
    --bs-offcanvas-width: 268px;
    width: 268px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #111 0%, var(--black) 60%, #151310 100%);
    color: #e9e6df;
    display: flex;
    flex-direction: column;
    border-right: 3px solid var(--gold);
}

@media (min-width: 992px) {

    .ad-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.ad-marca {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.1rem 1.1rem 1rem;
    border-bottom: 1px solid rgba(212, 164, 55, .25);
}

.ad-marca-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    text-decoration: none;
    color: #fff;
}

.ad-marca-logo {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(212, 164, 55, .5);
}

.ad-marca-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ad-marca-texto strong {
    font-family: 'Oswald', sans-serif;
    font-size: 1.02rem;
    letter-spacing: .02em;
    color: var(--gold-light);
}

.ad-marca-texto small {
    color: #a49e90;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.ad-menu {
    flex: 1;
    overflow-y: auto;
    padding: .9rem .8rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.ad-menu-titulo {
    margin: .8rem .55rem .35rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: #8d8776;
}

.ad-menu-titulo:first-child {
    margin-top: 0;
}

.ad-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .62rem .7rem;
    border-radius: 9px;
    color: #ddd8cb;
    text-decoration: none;
    font-size: .95rem;
    border-left: 3px solid transparent;
    transition: background .15s ease, color .15s ease;
}

.ad-link i:first-child {
    font-size: 1.08rem;
    color: var(--gold);
    width: 1.25rem;
    text-align: center;
}

.ad-link:hover {
    background: rgba(212, 164, 55, .12);
    color: #fff;
}

.ad-link.active {
    background: linear-gradient(90deg, rgba(212, 164, 55, .28), rgba(212, 164, 55, .08));
    border-left-color: var(--gold);
    color: #fff;
    font-weight: 600;
}

.ad-seta {
    font-size: .72rem;
    color: #8d8776;
    opacity: 0;
    transition: opacity .15s ease;
}

.ad-link:hover .ad-seta,
.ad-link.active .ad-seta {
    opacity: 1;
}

.ad-link.active .ad-seta {
    color: var(--gold);
}

.ad-rodape {
    padding: 1rem 1.1rem 1.2rem;
    border-top: 1px solid rgba(212, 164, 55, .25);
}

.ad-usuario {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .8rem;
    color: #fff;
}

.ad-usuario i {
    font-size: 1.7rem;
    color: var(--gold);
}

.ad-usuario-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.ad-usuario-texto strong {
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-usuario-texto small {
    color: #a49e90;
    font-size: .75rem;
}

/* Barra superior do conteudo */
.ad-topo {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1.4rem;
    background: #fff;
    border-bottom: 1px solid #e5e0d5;
    box-shadow: 0 2px 12px rgba(13, 13, 13, .05);
}

.ad-topo-titulo {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
}

.ad-topo-data {
    margin-left: auto;
    color: #8a8577;
    font-size: .86rem;
    text-transform: capitalize;
}

/* Miniatura da foto do produto nas tabelas do admin */
.ad-foto-thumb {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e0d5;
}

.ad-foto-preview {
    max-width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e0d5;
}

/* --------------------------------------------------------------
   Landing page
   -------------------------------------------------------------- */
.lp-nav {
    background: rgba(13, 13, 13, .92);
    backdrop-filter: blur(6px);
}

.lp-nav .nav-link {
    color: #ddd;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .08em;
}

.lp-nav .nav-link:hover {
    color: var(--gold);
}

.lp-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 40%, #2b2b2b, var(--black) 70%);
    color: #fff;
    padding-top: 80px;
}

.lp-hero h1 {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lp-section {
    padding: 90px 0;
}

.lp-dark {
    background: var(--black);
    color: #eee;
}

.lp-title {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.lp-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--gold);
    margin: 14px auto 0;
}

.lp-card {
    background: var(--charcoal);
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    padding: 28px;
    height: 100%;
    transition: transform .3s, border-color .3s;
}

.lp-card:hover {
    transform: translateY(-6px);
    border-color: var(--gold);
}

.lp-card i {
    font-size: 2.2rem;
    color: var(--gold);
}

.lp-preco {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #444;
    padding: 10px 0;
}

.lp-preco strong {
    color: var(--gold);
}

.lp-footer {
    background: #000;
    color: #888;
}

.lp-whats {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}

/* --------------------------------------------------------------
   Assistente do churrasco (site)
   Chat de dicas que fica flutuando acima do botao do WhatsApp
   -------------------------------------------------------------- */
.ia-botao {
    position: fixed;
    right: 20px;
    bottom: 92px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .72rem 1.1rem;
    border: 0;
    border-radius: 99px;
    background: var(--grad-gold);
    color: var(--black);
    font-weight: 700;
    font-size: .92rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
    transition: transform .2s ease;
}

.ia-botao:hover {
    transform: translateY(-2px);
}

.ia-botao i {
    font-size: 1.15rem;
}

.ia-janela {
    position: fixed;
    right: 20px;
    bottom: 92px;
    z-index: 1002;
    width: 372px;
    max-width: calc(100vw - 24px);
    height: 540px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #161513;
    border: 1px solid rgba(212, 164, 55, .45);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
    animation: iaEntrar .28s ease both;
}

@keyframes iaEntrar {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.ia-topo {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .8rem .95rem;
    background: #0d0d0d;
    border-bottom: 2px solid var(--gold);
    color: #fff;
}

.ia-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--grad-gold);
    color: var(--black);
    font-size: 1.15rem;
}

.ia-topo-texto {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.ia-topo-texto strong {
    font-size: .95rem;
}

.ia-topo-texto small {
    color: #a49e90;
    font-size: .76rem;
}

.ia-fechar {
    border: 0;
    background: transparent;
    color: #ccc;
    font-size: 1rem;
    padding: .3rem;
}

.ia-fechar:hover {
    color: #fff;
}

.ia-mensagens {
    flex: 1;
    overflow-y: auto;
    padding: .9rem;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: radial-gradient(circle at 50% 0%, #221e18, #131110 75%);
}

.ia-linha {
    display: flex;
}

.ia-linha.user {
    justify-content: flex-end;
}

.ia-bolha {
    max-width: 85%;
    padding: .6rem .8rem;
    border-radius: 14px;
    font-size: .88rem;
    line-height: 1.45;
    color: #f2efe8;
    background: #26231f;
    border: 1px solid rgba(255, 255, 255, .06);
    border-bottom-left-radius: 4px;
}

.ia-linha.user .ia-bolha {
    background: linear-gradient(180deg, #e8bc4e, var(--gold));
    color: #1c1a17;
    border: 0;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 4px;
}

/* Cartaozinho com o preco atual do produto vinculado a dica */
.ia-preco {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: .6rem;
    padding: .55rem .65rem;
    background: rgba(212, 164, 55, .12);
    border: 1px solid rgba(212, 164, 55, .5);
    border-radius: 10px;
}

.ia-preco-foto {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.ia-preco-nome {
    color: var(--gold-light);
    font-weight: 600;
}

.ia-preco s {
    color: #a49e90;
}

.ia-preco strong {
    color: var(--gold);
    font-size: 1.05rem;
}

.ia-preco small {
    color: #a49e90;
}

.ia-digitando {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: .8rem .9rem;
}

.ia-digitando i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: iaDigitar 1s infinite;
}

.ia-digitando i:nth-child(2) {
    animation-delay: .15s;
}

.ia-digitando i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes iaDigitar {
    0%, 60%, 100% {
        opacity: .3;
        transform: none;
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.ia-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .6rem .7rem;
    background: #100f0e;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.ia-chip {
    border: 1px solid rgba(212, 164, 55, .55);
    background: transparent;
    color: var(--gold-light);
    border-radius: 99px;
    padding: .28rem .65rem;
    font-size: .74rem;
    transition: background .15s ease, color .15s ease;
}

.ia-chip:hover {
    background: var(--gold);
    color: var(--black);
}

.ia-form {
    display: flex;
    gap: .5rem;
    padding: .65rem .7rem .75rem;
    background: #100f0e;
}

.ia-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #3a372f;
    border-radius: 99px;
    background: #1d1b18;
    color: #fff;
    padding: .55rem .95rem;
    font-size: .88rem;
    outline: none;
}

.ia-input:focus {
    border-color: var(--gold);
}

.ia-enviar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: var(--grad-gold);
    color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {

    .ia-janela {
        right: 12px;
        bottom: 84px;
    }

    .ia-botao {
        right: 12px;
        bottom: 88px;
    }
}

/* --------------------------------------------------------------
   Acesso da TV (WebView)
   Estilos que ficavam dentro da pagina tv/acesso, agora aqui,
   com escopo restrito ao body.tv-launcher daquela pagina.
   -------------------------------------------------------------- */
body.tv-launcher {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    background: #171717;
}

.tv-login-box {
    width: min(430px, calc(100% - 32px));
}

.tv-login-logo {
    width: 140px;
    max-width: 45%;
    display: block;
    margin: 0 auto 18px;
    border-radius: 8px;
}

.tv-card {
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
}

.tv-select {
    min-height: 50px;
    font-size: 1rem;
}

.tv-contador {
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 700;
}
