body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

body.is-loading .app-wrapper {
    opacity: 0;
    visibility: hidden;
}

#app-preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgb(255, 255, 255), rgb(255, 255, 255));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity .25s ease, visibility .25s ease;
}

#app-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

#app-preloader .preloader-card {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    color: #111827;
    font-weight: 600;
}

#app-preloader .preloader-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(239, 68, 68, 0.25);
    border-top-color: #ef4444;
    animation: preloader-spin .9s linear infinite;
}

#app-preloader .preloader-text {
    letter-spacing: .01em;
}

@keyframes preloader-spin {
    to {
        transform: rotate(360deg);
    }
}

.card.shadow-soft {
    box-shadow: 0 18px 30px -18px rgba(15, 23, 42, 0.3);
}

.navbar {
    background: #ef4444 !important;
    box-shadow: 0 10px 20px -15px rgba(0, 0, 0, 0.6);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.navbar-brand span {
    font-weight: 400;
    opacity: .8;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

body.layout-sidebar {
    overflow-x: hidden;
}

body.layout-sidebar .navbar {
    position: sticky;
    top: 0;
    z-index: 1031;
}

body.layout-sidebar .navbar-nav.mr-auto {
    display: none;
}

body.layout-sidebar .layout-toggle-top {
    display: none;
}


.app-sidebar {
    display: none;
}

body.layout-sidebar .app-sidebar {
    display: block;
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    width: 240px;
    background: #EF4444;
    color: #f9fafb;
    padding: 1rem 0.75rem;
    overflow-y: auto;
    z-index: 1030;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 12px 0 24px -16px rgba(15, 23, 42, 0.6);
}

body.layout-sidebar .app-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.layout-sidebar .app-sidebar-footer {
    margin-top: auto;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

body.layout-sidebar .app-sidebar-footer {
    justify-content: flex-start;
}

body.layout-sidebar .app-sidebar .nav-link {
    color: #f9fafb;
    padding: .55rem .75rem .55rem 1.1rem;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .92rem;
    font-weight: 600;
    letter-spacing: .01em;
    position: relative;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}

body.layout-sidebar .app-sidebar .nav-item+.nav-item {
    margin-top: .2rem;
}

body.layout-sidebar .app-sidebar .nav-link i {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .6rem;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

body.layout-sidebar .app-sidebar .nav-link:hover,
body.layout-sidebar .app-sidebar .nav-link:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 10px 20px -16px rgba(15, 23, 42, 0.7);
}

body.layout-sidebar .app-sidebar .nav-link.active,
body.layout-sidebar .app-sidebar .nav-link[aria-current="page"] {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.85);
}

body.layout-sidebar .app-sidebar .nav-link::before {
    content: "";
    position: absolute;
    left: .4rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    opacity: 0;
    transition: opacity .2s ease, height .2s ease, background .2s ease;
}

body.layout-sidebar .app-sidebar .nav-link:hover::before {
    opacity: .6;
    height: 70%;
}

body.layout-sidebar .app-sidebar .nav-link.active::before,
body.layout-sidebar .app-sidebar .nav-link[aria-current="page"]::before {
    opacity: 1;
    height: 78%;
    background: #fef2f2;
    box-shadow: 0 0 0 1px rgba(254, 242, 242, 0.7), 0 0 12px rgba(254, 242, 242, 0.75);
}

body.layout-sidebar .app-sidebar-footer .btn {
    font-weight: 600;
    letter-spacing: .02em;
}

body.layout-sidebar .app-content {
    margin-left: 240px;
    width: calc(100% - 240px);
    max-width: calc(100% - 240px);
    overflow-x: hidden;
}

body.layout-sidebar .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (max-width: 991.98px) {

    .layout-toggle,
    .layout-toggle-top {
        display: none !important;
    }

    body.layout-sidebar .app-sidebar {
        display: none;
    }

    body.layout-sidebar .app-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
    }
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.page-subtitle {
    color: #6b7280;
}

/* Cards de Métricas - Fundo Claro com Cores Diferentes */
.card-metric {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb;
}

/* Card Em Estoque - Azul claro */
.card-metric-estoque {
    background: #eff6ff !important;
    border-left: 4px solid #3b82f6 !important;
}

.card-metric-estoque .metric-label {
    color: #1e40af !important;
}

.card-metric-estoque .metric-value {
    color: #1e3a8a !important;
}

/* Card Vendidos - Verde claro */
.card-metric-vendidos {
    background: #f0fdf4 !important;
    border-left: 4px solid #22c55e !important;
}

.card-metric-vendidos .metric-label {
    color: #166534 !important;
}

.card-metric-vendidos .metric-value {
    color: #14532d !important;
}

/* Card Reservados - Amarelo claro */
.card-metric-reservados {
    background: #fefce8 !important;
    border-left: 4px solid #eab308 !important;
}

.card-metric-reservados .metric-label {
    color: #854d0e !important;
}

.card-metric-reservados .metric-value {
    color: #713f12 !important;
}

/* Card Em Avaliação - Roxo claro */
.card-metric-avaliacao {
    background: #faf5ff !important;
    border-left: 4px solid #a855f7 !important;
}

.card-metric-avaliacao .metric-label {
    color: #6b21a8 !important;
}

.card-metric-avaliacao .metric-value {
    color: #581c87 !important;
}

/* Card Vendas do Mês - Laranja claro */
.card-metric-vendas-mes {
    background: #fff7ed !important;
    border-left: 4px solid #f97316 !important;
}

.card-metric-vendas-mes .metric-value {
    color: #9a3412 !important;
}

/* Card Vendas de Hoje - Ciano claro */
.card-metric-vendas-hoje {
    background: #ecfeff !important;
    border-left: 4px solid #06b6d4 !important;
}

.card-metric-vendas-hoje .metric-value {
    color: #164e63 !important;
}

/* Card Avaliações - Rosa claro */
.card-metric-avaliacoes {
    background: #fdf2f8 !important;
    border-left: 4px solid #ec4899 !important;
}

.card-metric-avaliacoes .metric-value {
    color: #9f1239 !important;
}

.card-metric .metric-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280 !important;
    opacity: 1;
}

.card-metric .metric-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827 !important;
}

.card-metric .metric-desc {
    font-size: 0.85rem;
    color: #6b7280 !important;
    opacity: 1;
}

.badge-soft {
    background-color: #fee2e2;
    color: #b91c1c;
    border-radius: 999px;
    padding: .15rem .65rem;
}

/* LOGIN */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.auth-card {
    max-width: 420px;
    width: 100%;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.auth-logo img {
    max-height: 80px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.form-control {
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    color: #111827;
}

.form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 .15rem rgba(239, 68, 68, .2);
    background-color: #ffffff;
    color: #111827;
}

.btn-primary {
    border-radius: .5rem;
    background: #ef4444;
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.text-muted {
    color: #6b7280 !important;
}

@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.25rem;
    }
}