/* Identidade visual HotelTech (fonte Inter + paleta da marca) para o painel
   ADM (index.html) e o Painel do Hotel (hotel-login.html/hotel-dashboard.html).
   Carregado por ultimo no <head> de cada pagina: so redefine variaveis e
   cores por cima do CSS que ja existe, sem mexer no layout das telas. */
:root {
    --ht-navy: #0B2545;
    --ht-navy-2: #13315C;
    --ht-acao: #2E86DE;
    --ht-acao-hover: #1F6FBF;
    --ht-turquesa: #1B9AAA;
    --ht-ciano: #00AEEF;
    --ht-dourado: #C9A227;
    --ht-dourado-escuro: #B8901F;
    --ht-texto: #1A2233;
    --ht-texto-2: #6B7891;
    --ht-apagado: #9AA7BD;
    --ht-fundo: #F4F6FA;
    --ht-cartao: #FFFFFF;
    --ht-suave: #F8FAFE;
    --ht-linha: #E4E9F2;
    --ht-borda-campo: #D8DEE8;
    --ht-positivo: #1E9E62;
    --ht-ganho: #14804A;
    --ht-atencao: #E0A100;
    --ht-erro: #D64545;
    --ht-whatsapp: #25D366;
    --ht-fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Variaveis que as telas ja usam, apontadas para a marca */
    --primary: var(--ht-acao);
    --primary-dark: var(--ht-acao-hover);
    --primary-light: #4B9BE6;
    --secondary: var(--ht-texto-2);
    --success: var(--ht-positivo);
    --success-light: #DDF3E8;
    --danger: var(--ht-erro);
    --danger-light: #FBE4E4;
    --warning: var(--ht-atencao);
    --warning-light: #FCF1D2;
    --info: var(--ht-acao);
    --info-light: #E2EFFB;
    --dark: var(--ht-texto);
    --dark-light: var(--ht-navy-2);
    --gray: var(--ht-texto-2);
    --light: var(--ht-fundo);
    --light-dark: var(--ht-linha);

    /* tema HotelHub do ADM */
    --hh-indigo: var(--ht-navy-2);
    --hh-blue: var(--ht-acao);
    --hh-navy: var(--ht-navy);
    --hh-navy2: var(--ht-navy-2);
    --hh-bg: var(--ht-fundo);
    --hh-line: var(--ht-linha);
    --hh-muted: var(--ht-texto-2);

    /* aba Espelho TV / servidores do ADM */
    --sp-bg: var(--ht-fundo);
    --sp-surf: var(--ht-cartao);
    --sp-card: var(--ht-suave);
    --sp-border: var(--ht-linha);
    --sp-accent: var(--ht-acao);
    --sp-cyan: var(--ht-turquesa);
    --sp-green: var(--ht-positivo);
    --sp-red: var(--ht-erro);
    --sp-yellow: var(--ht-atencao);
    --sp-text: var(--ht-texto);
    --sp-muted: var(--ht-texto-2);
    --sp-ui: var(--ht-fonte);
}

body, html, button, input, select, textarea { font-family: var(--ht-fonte); }
body { color: var(--ht-texto); -webkit-font-smoothing: antialiased; }

/* ---------- Botoes e campos (as duas paginas) ---------- */
.btn-primary { background: var(--ht-acao); }
.btn-primary:hover { background: var(--ht-acao-hover) !important; }
input:focus, select:focus, textarea:focus, .form-control:focus {
    border-color: var(--ht-acao) !important;
    box-shadow: 0 0 0 3px rgba(46, 134, 222, .14) !important;
}
a { color: var(--ht-acao); }
a:hover { color: var(--ht-acao-hover); }

/* ============================ ADM (index.html) ============================ */
.nav-tabs {
    background: linear-gradient(180deg, var(--ht-navy) 0%, var(--ht-navy-2) 100%) !important;
}
.hh-side-label { color: var(--ht-apagado) !important; opacity: .75; }
.nav-tabs .tab-link { color: #B9C6DB !important; }
.nav-tabs .tab-link.active {
    background: var(--ht-acao) !important;
    box-shadow: 0 8px 18px rgba(46, 134, 222, .35) !important;
}
.hh-kbtn, .hh-hotels-tools .hh-add, .hw-card-btn-primary.hh-navy-btn {
    background: var(--ht-acao) !important;
    box-shadow: 0 8px 18px rgba(46, 134, 222, .28) !important;
}
.hh-kbtn:hover, .hh-hotels-tools .hh-add:hover { background: var(--ht-acao-hover) !important; }
.hh-brand .tile, .hh-userbox .av { background: linear-gradient(135deg, var(--ht-navy-2), var(--ht-acao)) !important; }
.hh-greet h1 { color: var(--ht-navy); }
.hh-qcard span { color: var(--ht-texto); }
.hotel-detail-card, .hotel-info-section { background: var(--ht-navy) !important; }
.hotel-card-header::before {
    background: linear-gradient(180deg, rgba(11, 37, 69, .1) 0%, rgba(11, 37, 69, .45) 50%, rgba(11, 37, 69, .95) 100%) !important;
}
.hotel-info-section .info-label { color: var(--ht-apagado) !important; }
.card-title, .card-title i { color: var(--ht-navy); }
.card-title i { color: var(--ht-acao); }

/* Login do ADM */
form#login-form, form#login-2fa-form {
    background: rgba(11, 37, 69, .62) !important;
    border-color: rgba(0, 174, 239, .28) !important;
}

/* Modo noite do ADM (padrao): navy da marca em vez do azul arroxeado */
body:not(.hh-day) #app-container { background: #0A1628 !important; }
body:not(.hh-day) #tab-dashboard .card,
body:not(.hh-day) #tab-dashboard .dashboard-card,
body:not(.hh-day) #tab-dashboard .chart-container { background: #10233F !important; }
body:not(.hh-day) #tab-dashboard table thead tr,
body:not(.hh-day) #tab-dashboard table thead { background: var(--ht-navy-2) !important; }
body:not(.hh-day) #tab-dashboard .form-control,
body:not(.hh-day) .hh-sq, body:not(.hh-day) .hh-userbox, body:not(.hh-day) .hh-logout { background: #142B4C !important; }
body:not(.hh-day) .hh-greet h1 { color: #E6F1FF !important; }

/* ===================== Painel do Hotel (hotel-dashboard) ===================== */
aside#sidebar { background: linear-gradient(180deg, var(--ht-navy) 0%, var(--ht-navy-2) 100%); }
aside#sidebar .nav-group-title { color: var(--ht-apagado); opacity: .75; }
aside#sidebar .nav-item { color: #B9C6DB; }
aside#sidebar .nav-item.active { background: var(--ht-acao); color: #fff; box-shadow: 0 6px 14px rgba(46, 134, 222, .3); }
header.topbar h2 { color: var(--ht-navy); }
.card h3 { color: var(--ht-navy); }
.card h3 i, .stat-card i { color: var(--ht-acao); }
.stat-card i { background: #E2EFFB; }
.stat-card.accent-red i { color: var(--ht-erro); background: #FBE4E4; }
.stat-card.accent-green i { color: var(--ht-positivo); background: #DDF3E8; }
.stat-card.accent-purple i { color: var(--ht-turquesa); background: #DDF1F3; }
.dash-resumo .taxa-num { color: var(--ht-acao); }
tr:hover td { background: var(--ht-suave); }
input, select, textarea { border-color: var(--ht-borda-campo); }
.tag.admin { background: #E2EFFB; color: var(--ht-navy); }
.tag.ok { color: var(--ht-ganho); }
.btn-success:hover { background: var(--ht-ganho); }
.btn-danger:hover { background: #BF3A3A; }

/* Login do hotel */
.boas-vindas h2, .boas-vindas p { font-family: var(--ht-fonte) !important; }
.boas-vindas h2 { font-weight: 800; letter-spacing: -.01em; }
.boas-vindas p { font-style: normal; font-weight: 500; color: #CFE3F7; }

/* =================== Barra lateral recolhivel (ht-sidebar.js) =================== */
.ht-recolher {
    display: flex; align-items: center; gap: 13px; width: 100%;
    margin: 4px 0 6px; padding: 9px 14px; border: none; border-radius: 12px;
    background: rgba(255, 255, 255, .06); color: #B9C6DB; cursor: pointer;
    font: 500 .82rem var(--ht-fonte); text-align: left; transition: background .15s, color .15s;
}
.ht-recolher:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.ht-recolher i { width: 18px; text-align: center; transition: transform .2s; }
aside#sidebar .ht-recolher { margin: .2rem .7rem 0; width: calc(100% - 1.4rem); padding: .5rem .7rem; border-radius: 8px; gap: .6rem; }

/* transicoes de largura */
.nav-tabs, #app-container, aside#sidebar { transition: width .2s ease, padding .2s ease; }

/* ADM recolhido: so icones (largura 76px) */
html.ht-recolhido .nav-tabs { width: 76px !important; padding: 0 10px 20px !important; overflow-x: hidden; }
html.ht-recolhido #app-container { padding-left: 76px !important; }
html.ht-recolhido #app-container.hh-sem-sidebar { padding-left: 0 !important; }
html.ht-recolhido .nav-tabs .tab-link { justify-content: center !important; padding: 11px 0 !important; gap: 0 !important; }
html.ht-recolhido .nav-tabs .tab-link span,
html.ht-recolhido .ht-recolher span { display: none; }
html.ht-recolhido .nav-tabs .hh-side-label {
    font-size: 0; padding: 0; margin: 10px 8px; height: 1px; background: rgba(255, 255, 255, .12);
}
html.ht-recolhido .nav-tabs .hh-brand { padding: 14px 0 6px !important; }
html.ht-recolhido #hh-logo { display: none; }
html.ht-recolhido .nav-tabs .hh-brand::after {
    content: ""; width: 46px; height: 30px; filter: brightness(0) invert(1);
    background: url("/logo-hotelhub.png") -26px -56px / 225px 150px no-repeat;
}
html.ht-recolhido .ht-recolher { justify-content: center; padding: 9px 0; gap: 0; }
html.ht-recolhido .ht-recolher i { transform: rotate(180deg); }

/* Hotel recolhido (so em tela grande; no celular a barra continua abrindo por cima) */
@media (min-width: 901px) {
    html.ht-recolhido aside#sidebar { --sidebar-w: 72px; width: 72px; overflow-x: hidden; }
    html.ht-recolhido aside#sidebar .sidebar-brand { padding: 1.2rem .4rem .8rem; text-align: center; }
    html.ht-recolhido aside#sidebar #ht-logo-hotel { display: none; }
    html.ht-recolhido aside#sidebar .sidebar-brand h1::before {
        content: ""; display: block; margin: 0 auto; width: 46px; height: 30px; filter: brightness(0) invert(1);
        background: url("/logo-hotelhub.png") -26px -56px / 225px 150px no-repeat;
    }
    html.ht-recolhido aside#sidebar .sidebar-brand div { display: none; }
    html.ht-recolhido aside#sidebar nav.side-nav { padding: .5rem .5rem; }
    html.ht-recolhido aside#sidebar .nav-group-title {
        font-size: 0; padding: 0; margin: .6rem .3rem; height: 1px; background: rgba(255, 255, 255, .12);
    }
    html.ht-recolhido aside#sidebar .nav-item { justify-content: center; padding: .65rem 0; gap: 0; }
    html.ht-recolhido aside#sidebar .nav-item span,
    html.ht-recolhido aside#sidebar .sidebar-footer span,
    html.ht-recolhido aside#sidebar .ht-recolher span { display: none; }
    html.ht-recolhido aside#sidebar .sidebar-footer { padding: .6rem .5rem; }
    html.ht-recolhido aside#sidebar .ht-recolher { margin: .2rem .5rem 0; width: calc(100% - 1rem); justify-content: center; padding: .5rem 0; }
}
@media (max-width: 900px) {
    aside#sidebar .ht-recolher { display: none; }
}

/* ===================== Visual "clean" do Dashboard do ADM =====================
   Cartoes de numero brancos (sem gradiente colorido): a cor fica so no icone.
   No modo escuro os mesmos cartoes ficam navy, tambem sem cor de fundo. */
.dsh-kpi {
    background: var(--ht-cartao) !important; color: var(--ht-texto) !important;
    border: 1px solid var(--ht-linha) !important; box-shadow: 0 1px 2px rgba(11, 37, 69, .05) !important;
}
.dsh-marca { display: none !important; }
.dsh-kpi-titulo { color: var(--ht-texto-2); opacity: 1; font-weight: 500; }
.dsh-kpi-num { color: var(--ht-navy); }
.dsh-kpi-delta { color: var(--ht-texto-2); opacity: 1; }
.dsh-kpi-delta .sobe { color: var(--ht-positivo) !important; }
.dsh-kpi-delta .desce, .dsh-kpi-delta .ruim { color: var(--ht-erro) !important; }
.dsh-kpi-delta .igual { color: var(--ht-texto-2) !important; }
.dsh-kpi-icone { font-size: 1.15rem; }
.dsh-azul .dsh-kpi-icone    { background: #E2EFFB; color: var(--ht-acao); }
.dsh-verde .dsh-kpi-icone   { background: #DDF3E8; color: var(--ht-positivo); }
.dsh-roxo .dsh-kpi-icone    { background: #DDF1F3; color: var(--ht-turquesa); }
.dsh-laranja .dsh-kpi-icone { background: #FCF1D2; color: #B8901F; }
.dsh-seta {
    border: 1px solid var(--ht-linha) !important; background: var(--ht-suave) !important;
    color: var(--ht-texto-2) !important; backdrop-filter: none !important;
}
.dsh-seta:hover { background: var(--ht-linha) !important; color: var(--ht-navy) !important; }
.dsh-card { box-shadow: 0 1px 2px rgba(11, 37, 69, .05); backdrop-filter: none; }
body.hh-day .dsh-card { background: var(--ht-cartao); }
.dsh-card-titulo i, .dsh-dica i { color: var(--ht-acao); }
.dsh-pilulas button.ativa { background: var(--ht-acao); }
.dsh-dica { background: var(--ht-suave); border-color: var(--ht-linha); }

/* faixa de resumo do topo: neutra em vez de rosa */
#app-container > .status-bar {
    background: var(--ht-cartao) !important; border: 1px solid var(--ht-linha) !important; color: var(--ht-texto-2) !important;
}
/* alertas: fundo branco, so a borda esquerda colorida */
.alert-critical, .alert-warning, .alert-info { background: var(--ht-cartao) !important; color: var(--ht-texto) !important; }
.alert-critical { border: 1px solid var(--ht-linha); border-left: 3px solid var(--ht-erro) !important; }
.alert-warning  { border: 1px solid var(--ht-linha); border-left: 3px solid var(--ht-atencao) !important; }
.alert-info     { border: 1px solid var(--ht-linha); border-left: 3px solid var(--ht-acao) !important; }
.alert-critical i { color: var(--ht-erro); } .alert-warning i { color: var(--ht-atencao); }

/* modo escuro (opcional, pelo botao da lua) */
body:not(.hh-day) .dsh-kpi { background: #10233F !important; border-color: rgba(255, 255, 255, .07) !important; }
body:not(.hh-day) .dsh-kpi-num { color: #E6F1FF; }
body:not(.hh-day) .dsh-kpi-titulo, body:not(.hh-day) .dsh-kpi-delta { color: var(--ht-apagado); }
body:not(.hh-day) .dsh-kpi-icone { background: rgba(255, 255, 255, .07) !important; }
body:not(.hh-day) .dsh-seta { background: rgba(255, 255, 255, .05) !important; border-color: rgba(255, 255, 255, .1) !important; color: var(--ht-apagado) !important; }
body:not(.hh-day) #app-container > .status-bar,
body:not(.hh-day) #tab-dashboard .alert-critical, body:not(.hh-day) #tab-dashboard .alert-warning, body:not(.hh-day) .alert-info {
    background: #10233F !important; border-color: rgba(255, 255, 255, .07) !important; color: #D8DEE8 !important;
}

/* Logo do HotelTechHub no topo do Painel do Hotel (igual ao ADM) */
aside#sidebar .sidebar-brand { text-align: center; padding: .6rem 1rem .4rem; }
aside#sidebar .sidebar-brand h1 { margin: 0; line-height: 0; }
#ht-logo-hotel { max-width: 100%; max-height: 110px; width: auto; object-fit: contain; filter: brightness(0) invert(1); }
aside#sidebar #brand-sub { margin-top: -14px; margin-bottom: .4rem; letter-spacing: .04em; }
