/* main.material.css — Versão Material Design 3 (clean)
   Baseado no seu arquivo original.
   Escolhas aplicadas: manter paleta azul, bordas suaves (8px), flat (quase sem sombras).
   Organizado, simplificado e pronto para integrar com seu tema WordPress.
*/

:root {
    /* Tipografia */
    --font-primary: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Paleta (mantida e harmonizada) */
    --md-primary: #1e3a8a;
    /* seu azul principal */
    --md-primary-variant: #1e40af;
    --md-accent: #3b82f6;
    /* secundário */
    --md-accent-strong: #2563eb;

    /* Neutros */
    --bg: #F8F8FF;
    /* leve off-white */
    --surface: #FFFFFF;
    --muted: #64748b;
    --text: #0f1724;
    /* escuro para texto */
    --border: #e6edf8;
    /* levemente azulado */

    /* Tokens de espaçamento e radius */
    --space-xs: 6px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --radius-sm: 8px;
    /* solicitado */

    /* Elevation: minimal / flat */
    --elevation-none: none;

    /* acessibilidade */
    --focus-ring: 3px;
}

/* ================= Reset / Base ================= */
* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--md-primary);
    margin: 0 0 .6rem 0;
    line-height: 1.2;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600
}

/* Links */
a {
    color: inherit;
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

/* ================= Header (sticky, clean) ================= */
.header-moderno {
    position: sticky;
    top: 0;
    z-index: 1200;
    height: 80px;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72));
    border-bottom: 1px solid var(--border);
    padding: 0 12px;
    backdrop-filter: blur(6px);
}

/* brand/logo */
.navbar-brand {
    font-weight: 700;
    color: var(--md-primary);
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 8px
}

.custom-logo {
    max-height: 56px;
    transition: transform .16s ease
}

.custom-logo:hover {
    transform: scale(1.02)
}

/* offcanvas toggle */
.offcanvas-toggle {
    background: transparent;
    color: var(--md-primary);
    font-size: 1.5rem;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: transform .14s ease, background .14s ease;
    border: 1px solid transparent;
}

.offcanvas-toggle:hover {
    background: rgba(59, 130, 246, 0.06);
    transform: scale(1.04)
}

/* search compact */
.search-group {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: calc(var(--radius-sm));
    padding: 6px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 520px
}

.search-group input {
    border: 0;
    outline: none;
    background: transparent;
    padding: .375rem .5rem;
    width: 100%
}

.search-group .input-group-text {
    background: transparent;
    border: 0;
    padding: .25rem .5rem
}

/* user button */
.user-btn {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px
}

.user-btn .user-avatar {
    font-size: 1.4rem
}

.user-info .user-name {
    font-size: .9rem
}

/* header row alignment */
.header-moderno .row {
    align-items: center
}

/* ================= Sidebar Desktop (fixed) ================= */
.sidebar-desktop {
    position: fixed;
    left: 0;
    top: 80px;
    bottom: 0;
    width: 280px;
    padding: 20px 12px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-variant));
    color: #fff;
    overflow: auto;
    border-radius: 0 12px 12px 0;
    z-index: 1150;
}

.sidebar-desktop .sidebar-nav {
    padding: 0;
    margin: 0;
    list-style: none
}

.sidebar-desktop .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.95);
    padding: 10px 16px;
    margin: 6px 8px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background .12s ease, transform .12s ease;
}

.sidebar-desktop .nav-link .bi {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.95)
}

.sidebar-desktop .nav-link:hover,
.sidebar-desktop .nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(4px)
}

/* active left accent */
.sidebar-desktop .nav-link::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 3px;
    border-radius: 2px;
    background: transparent
}

.sidebar-desktop .nav-link.active::before {
    background: var(--md-accent)
}

/* dropdowns inside sidebar */
.sidebar-desktop .dropdown-menu {
    background: #fff;
    border: 0;
    box-shadow: none;
    margin-left: 0;
    padding: 0
}

.sidebar-desktop .dropdown-item {
    color: rgba(0, 0, 0, 0.92);
    padding-left: 2.25rem;
    padding: 12px 16px;
}

.sidebar-desktop .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.04)
}

/* ================= Offcanvas Mobile ================= */
#sidebarOffcanvas {
    width: 280px;
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-variant));
    color: #fff
}

#sidebarOffcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1rem 1.25rem
}

#sidebarOffcanvas .offcanvas-title {
    color: white;
    font-weight: 600
}

#sidebarOffcanvas .btn-close-white {
    filter: invert(1)grayscale(100%)brightness(180%);
    opacity: 0.85
}

#sidebarOffcanvas .offcanvas-body {
    padding: 0
}

#sidebarOffcanvas .sidebar-nav {
    padding: .5rem 0
}

#sidebarOffcanvas .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 1.5rem;
    text-decoration: none;
    border-left: 3px solid transparent
}

#sidebarOffcanvas .nav-link:hover,
#sidebarOffcanvas .nav-link.active {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: var(--md-accent)
}

/* ================= Main content area ================= */
.main-content {
    margin-left: 300px;
    padding: 28px;
    min-height: calc(100vh - 80px);
    transition: margin-left .28s ease;
    background: transparent
}

/* when sidebar hidden, main should be full width (mobile handled in media queries) */

/* ================= Cards (flat, Material-like) ================= */
.card-modern {
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: transform .12s ease, border-color .12s ease
}

.card-modern:hover {
    transform: translateY(-4px);
    border-color: var(--md-accent)
}

.card-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 100%;
    border-radius: 0;
    background: linear-gradient(90deg, var(--md-primary), var(--md-accent));
    transform: scaleX(1)
}

.card-modern a {
    color: inherit
}

/* ================= Services grid ================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px
}

.service-card {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: center;
    transition: transform .14s ease, background .14s ease
}

.service-card:hover {
    transform: translateY(-6px);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent)
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 10px
}

/* ================= Dropdowns (improved stacking & animation minimal) ================= */
.dropdown-menu {
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: .25rem 0;
    min-width: 12rem;
    transition: opacity .12s ease, transform .12s ease;
    z-index: 1250;
    max-height: 75vh;
    overflow: auto
}

.dropdown-menu.dropdown-menu-end {
    right: 0;
    left: auto
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px)scale(.995)
    }

    to {
        opacity: 1;
        transform: translateY(0)scale(1)
    }
}

.dropdown.show>.dropdown-menu {
    animation: dropdownIn .14s ease-out
}

/* ensure caret rotations are smooth */
.dropdown-toggle[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
    transition: transform .18s ease
}

.dropdown-toggle .bi-chevron-down {
    transition: transform .18s ease
}

.dropdown-item.dropdown-toggle[aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
    transition: transform .18s ease
}

/* ================= Carousel & Banner (clean) ================= */
#bannerCarousel {
    border-radius: var(--radius-sm);
    overflow: hidden
}

.carousel-img {
    height: 400px;
    object-fit: cover;
    object-position: center;
    object-position: 40% 20%;
}

.carousel-caption {
    background: linear-gradient(90deg, rgba(30, 58, 138, 0.92), rgba(59, 130, 246, 0.82));
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    bottom: 3rem;
    left: 2rem;
    right: auto;
    max-width: 540px;
    text-align: left;
}

.carousel-caption h3 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: .75rem;
    font-family: var(--font-heading)
}

.carousel-caption p {
    color: #fff;
    opacity: .95;
    font-size: 1rem;
    margin-bottom: 1rem
}

.carousel-indicators {
    bottom: 1rem
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    margin: 0 6px;
    border: 2px solid transparent
}

.carousel-indicators button.active {
    background-color: white
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
}

/* Banner promocional */
.banner-promocional {
    background: linear-gradient(135deg, var(--md-primary), var(--md-primary-variant));
    border-radius: var(--radius-sm);
    padding: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04)
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.banner-text {
    flex: 1;
    max-width: 70%
}

.banner-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--font-heading)
}

.banner-description {
    font-size: 1.05rem;
    opacity: .92;
    line-height: 1.5
}

.banner-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.banner-btn {
    padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    color: #fff
}

.banner-btn:hover {
    transform: translateY(-2px)
}

.banner-icon {
    font-size: 3.2rem;
    opacity: .92
}

/* ================= Footer ================= */
#rodape {
    background: var(--md-primary-variant);
    border-radius: 12px;
    padding: 16px;
    color: #fff
}

/* ================= Accessibility & focus ================= */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: var(--focus-ring) solid rgba(59, 130, 246, 0.14);
    outline-offset: 3px;
    border-radius: 6px
}

/* ================= Utilities ================= */
.text-muted {
    color: var(--muted)
}

.mb-1 {
    margin-bottom: 6px
}

.mb-2 {
    margin-bottom: 12px
}

.mb-3 {
    margin-bottom: 18px
}

.mt-2 {
    margin-top: 12px
}

.center {
    text-align: center
}

/* ================ Responsividade ================ */
@media (max-width:1024px) {
    .sidebar-desktop {
        width: 260px
    }

    .main-content {
        margin-left: 280px;
        padding: 24px
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 14px
    }

    .page-title {
        font-size: 1.8rem
    }
}

@media (max-width:991.98px) {
    .sidebar-desktop {
        display: none !important
    }

    .offcanvas-toggle {
        display: inline-block !important
    }

    .main-content {
        margin-left: 0 !important;
        margin-top: 80px;
        padding: 20px;
        width: 100%
    }

    .header-moderno {
        padding-left: 0
    }

    .search-group {
        padding: 6px
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px
    }

    .service-card {
        padding: 16px
    }

    .service-icon {
        font-size: 1.8rem
    }

    .page-title {
        font-size: 1.6rem
    }

    .card-title {
        font-size: 1rem
    }
}

@media (max-width:576px) {
    .header-moderno {
        height: 70px;
        padding: 0 8px
    }

    .custom-logo {
        max-height: 36px
    }

    .navbar .site-title {
        font-size: .9rem
    }

    .main-content {
        margin-top: 70px;
        padding: 16px
    }

    .page-title {
        font-size: 1.4rem;
        margin-bottom: .8rem
    }

    .card-modern {
        padding: 14px
    }

    .user-info .user-name {
        font-size: .8rem
    }

    .user-btn {
        padding: 4px 8px
    }

    #sidebarOffcanvas {
        width: 85%
    }
}

@media (max-width:400px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 10px
    }

    .service-card {
        padding: 14px
    }
}

@media (min-width:1440px) {
    .main-content {
        padding: 32px
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px
    }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce) {
    * {
        transition: none !important;
        animation: none !important
    }
}

/* Small fixes */
.dropdown-toggle::after {
    display: none
}

/* End of file */

/* Estilo padrão para conteúdo de aplicativos (Frontin360 e Chamados) */
.app-content article {
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);

    padding: 24px;
    margin-bottom: 24px;

    line-height: 1.75;
    font-size: 1.05rem;

    color: var(--text);
}

/* Títulos dentro do article */
.app-content article h1,
.app-content article h2,
.app-content article h3,
.app-content article h4 {
    margin-top: 1rem;
    margin-bottom: .75rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Parágrafos */
.app-content article p {
    margin-bottom: 1rem;
}

/* Listas */
.app-content article ul,
.app-content article ol {
    margin-left: 1.25rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

/* Imagens */
.app-content article img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

/* Tabelas (se houver) */
.app-content article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.app-content article table th,
.app-content article table td {
    border: 1px solid var(--border);
    padding: 10px;
}