﻿/**
 * Author:  SÃ©rgio Rosa SchÃ¼tz
 * Empresa: Pethos Tecnologia
 * Data e Hora: 14/02/2026 17:39
 * VersÃ£o: 2.3.1 (Build #3)
 * Finalidade: Componente de barra lateral unificada V17 Platinum.
 */

/* assets/css/utility-bar.css */

:root {
    --utility-bar-height: 54px;
    --utility-bg: rgba(255, 255, 255, 0.85);
    --utility-border: rgba(226, 232, 240, 0.9);
}

.utility-bar-fixed {
    position: fixed;
    top: var(--topbar-height, 70px);
    right: 0;
    left: var(--sidebar-w, 260px);
    height: var(--utility-bar-height);
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: left 0.3s ease, top 0.3s ease;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.utility-breadcrumb {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid var(--slate-200);
}

.utility-breadcrumb .level-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--slate-400);
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1;
}

.utility-breadcrumb .current-level {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-700);
    line-height: 1.2;
}

/* Ajustes de Layout */
body.sidebar-collapsed .utility-bar-fixed {
    left: 60px;
    /* Alinhado com a sidebar colapsada */
}

body.is-iframe-mode .utility-bar-fixed {
    left: 0;
}

@media (max-width: 768px) {
    .utility-bar-fixed {
        left: 0;
        padding: 0 12px;
        overflow-x: auto;
        white-space: nowrap;
        gap: 10px;
    }
}

/* BotÃµes do Canivete SuÃ­Ã§o */
.utility-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-utility {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.8);
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02), inset 0 1px 0 white;
    white-space: nowrap;
    overflow: hidden;
    z-index: 1;
}

/* Pseudo element for hover glow effect */
.btn-utility::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-utility i {
    font-size: 0.95rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-utility:hover {
    color: #2563eb;
    border-color: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(37,99,235,0.15), 0 4px 6px -4px rgba(37,99,235,0.1);
}

.btn-utility:hover i {
    transform: scale(1.15) rotate(-3deg);
}

.btn-utility:hover::before {
    opacity: 1;
}

.btn-utility:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* VariaÃ§Ãµes Premium (Coloridas Vivas V17) */

/* Azul (Filtro / BotÃµes Principais) */
.btn-utility.btn-primary-alt {
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: 1px solid #1d4ed8;
    box-shadow: 0 4px 10px rgba(37,99,235,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-utility.btn-primary-alt:hover {
    box-shadow: 0 8px 18px rgba(37,99,235,0.4);
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #ffffff;
}

/* Esmeralda / Verde (Excel) */
.btn-utility.btn-success-alt {
    color: #ffffff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid #047857;
    box-shadow: 0 4px 10px rgba(16,185,129,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-utility.btn-success-alt:hover {
    box-shadow: 0 8px 18px rgba(16,185,129,0.4);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #ffffff;
}

/* Rosa / Vermelho (PDF) */
.btn-utility.btn-danger-alt {
    color: #ffffff;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    border: 1px solid #be123c;
    box-shadow: 0 4px 10px rgba(225,29,72,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-utility.btn-danger-alt:hover {
    box-shadow: 0 8px 18px rgba(225,29,72,0.4);
    background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
    color: #ffffff;
}

/* Ã‚mbar / Laranja (JPG) */
.btn-utility.btn-warning-alt {
    color: #78350f;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: 1px solid #d97706;
    box-shadow: 0 4px 10px rgba(245,158,11,0.3), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-utility.btn-warning-alt:hover {
    box-shadow: 0 8px 18px rgba(245,158,11,0.4);
    background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    color: #78350f;
}

/* Ciano / Teal (Pesquisa) */
.btn-utility.btn-info-alt {
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border: 1px solid #155e75;
    box-shadow: 0 4px 10px rgba(8,145,178,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-utility.btn-info-alt:hover {
    box-shadow: 0 8px 18px rgba(8,145,178,0.4);
    background: linear-gradient(135deg, #22d3ee 0%, #0891b2 100%);
    color: #ffffff;
}

/* Divisor Vertical */
.utility-divider {
    width: 1px;
    height: 20px;
    background: var(--slate-200);
    margin: 0 4px;
}

/* Responsividade do ConteÃºdo Principal */
.main-content {
    padding-top: calc(var(--topbar-height, 70px) + var(--utility-bar-height) + 20px) !important;
}

body.focus-mode .utility-bar-fixed {
    top: 0;
    /* No modo foco, colamos no topo? Ou mantemos? */
}
