/**
 * Dashboard premium – layout chamativo com efeitos
 * Aplica apenas quando body tem a classe "dashboard"
 */

/* ---- Fundo e área de conteúdo ---- */
body.dashboard #wrapper .content {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    min-height: calc(100vh - 50px);
    padding-top: 8px;
}
body.dashboard #wrapper .content .row {
    margin-left: -10px;
    margin-right: -10px;
}
body.dashboard #wrapper .content [data-container] {
    padding: 10px;
}

/* ---- Cards principais (.panel_s) ---- */
body.dashboard .panel_s {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
body.dashboard .panel_s:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}
body.dashboard .panel_s > .panel-body {
    padding: 20px 24px;
}

/* ---- Mini cards de estatísticas (.panel.panel-primary, etc.) ---- */
body.dashboard .panel.panel-primary,
body.dashboard .panel.panel-success,
body.dashboard .panel.panel-info,
body.dashboard .panel.panel-warning,
body.dashboard .panel.panel-danger,
body.dashboard .panel.panel-default {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.dashboard .panel.panel-primary { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); color: #fff; }
body.dashboard .panel.panel-primary .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel.panel-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; }
body.dashboard .panel.panel-success .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel.panel-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); color: #fff; }
body.dashboard .panel.panel-info .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel.panel-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; }
body.dashboard .panel.panel-warning .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel.panel-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #fff; }
body.dashboard .panel.panel-danger .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel.panel-default {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #fff;
}
body.dashboard .panel.panel-default .panel-body small { color: rgba(255,255,255,.85); }
body.dashboard .panel .panel-body {
    padding: 16px 18px;
    border: none;
}
body.dashboard .panel .panel-body small {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
body.dashboard .panel:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* ---- Botões no dashboard ---- */
body.dashboard .btn {
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    border: none;
}
body.dashboard .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
body.dashboard .btn:active {
    transform: translateY(0);
}
body.dashboard .btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
body.dashboard .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}
body.dashboard .btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}
body.dashboard .btn-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
body.dashboard .btn-default {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: #475569;
    border: 1px solid #cbd5e1;
}
body.dashboard .btn-default:hover {
    background: linear-gradient(180deg, #f1f5f9 0%, #cbd5e1 100%);
    border-color: #94a3b8;
}

/* ---- Top stats / quick stats ---- */
body.dashboard .top_stats_wrapper {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
body.dashboard .top_stats_wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1);
}
body.dashboard .progress.progress-bar-mini {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
body.dashboard .progress.progress-bar-mini .progress-bar {
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* ---- Botão Opções do dashboard ---- */
body.dashboard .screen-options-btn {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.dashboard .screen-options-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ---- Títulos e cabeçalhos nos widgets ---- */
body.dashboard .panel_s h4.no-margin,
body.dashboard .panel_s h4 {
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.02em;
}

/* ---- Formulários no dashboard (selects, inputs) ---- */
body.dashboard .form-control {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
body.dashboard .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ---- Widget dragger (ícone de arrastar) ---- */
body.dashboard .widget-dragger {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
body.dashboard .panel_s:hover .widget-dragger {
    opacity: 0.8;
}

/* ---- Alerts no dashboard ---- */
body.dashboard .alert {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ---- Ajuste de margem superior do primeiro container ---- */
body.dashboard [data-container="top-12"] {
    margin-top: 4px;
}

/* ============================================
    SIDEBAR - Cor de fundo personalizada (#242254)
    Sobrescreve style.css e style.min.css
    ============================================ */
.sidebar {
     background: #242254 !important;
    background-color: #242254 !important;
    background-image: none !important;
    border-right-color: rgba(255, 255, 255, 0.12) !important;
}

aside#menu.sidebar,
#menu.sidebar,
#setup-menu-wrapper.sidebar {
    background: #242254 !important;
    background-color: #242254 !important;
    background-image: none !important;
}
[dir="rtl"] .sidebar {
    border-left-color: rgba(255, 255, 255, 0.12) !important;
}
.sidebar .sidebar-user-profile .profile {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}
.sidebar .sidebar-user-profile .profile:hover,
.sidebar .sidebar-user-profile .profile:focus {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    color: #fff !important;
}
.sidebar .sidebar-user-profile .profile .tw-text-neutral-500,
.sidebar .sidebar-user-profile .profile .tw-text-neutral-700 {
    color: rgba(255, 255, 255, 0.85) !important;
}
.sidebar ul.nav li a {
    color: rgba(255, 255, 255, 0.9) !important;
}
.sidebar ul.nav li a i.menu-icon {
    color: rgba(255, 255, 255, 0.85) !important;
}
.sidebar>ul.nav>li:hover a:first-child,
.sidebar>ul.nav>li.active a:first-child {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.sidebar ul.nav li.active>a,
.sidebar ul.nav>li>a:hover,
.sidebar ul.nav>li>a:focus,
.sidebar ul.nav li.active>a .menu-icon,
.sidebar ul.nav>li>a:hover .menu-icon,
.sidebar ul.nav>li>a:focus .menu-icon {
    color: #fff !important;
}
.sidebar ul.nav li a .arrow {
    color: rgba(255, 255, 255, 0.7) !important;
}
.sidebar ul.nav li .nav-second-level li a {
    color: rgba(255, 255, 255, 0.85) !important;
}
.sidebar ul.nav li .nav-second-level li.active a,
.sidebar ul.nav>li .nav-second-level>li:not(.active)>a:hover,
.sidebar ul.nav>li .nav-second-level>li:not(.active)>a:focus,
.sidebar ul.nav li .nav-second-level a:hover .menu-icon,
.sidebar ul.nav li .nav-second-level a:focus .menu-icon {
    color: #fff !important;
}
.sidebar ul.nav li .nav-third-level li a {
    color: rgba(255, 255, 255, 0.8) !important;
}
.sidebar ul.nav li .nav-third-level li.active a,
.sidebar ul.nav>li .nav-third-level>li:not(.active)>a:hover,
.sidebar ul.nav>li .nav-third-level>li:not(.active)>a:focus {
    color: #fff !important;
}
.sidebar .pinned-separator {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.sidebar .pinned_project a,
.sidebar .pinned_project small {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Navbar: PDV + Suporte + Abrir Caixa + Relatórios – sempre em linha (lado a lado) */
.navbar-pdv-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
}
.navbar-pdv-buttons a,
.navbar-pdv-buttons .navbar-pdv-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    align-items: center;
}
.navbar-pdv-buttons .navbar-pdv-btn {
    border-radius: 8px;
}
.navbar-pdv-buttons .btn-success.navbar-pdv-btn,
.navbar-pdv-buttons a.btn-success {
    color: #fff !important;
}
.navbar-pdv-buttons .btn-success.navbar-pdv-btn:hover,
.navbar-pdv-buttons a.btn-success:hover {
    color: #000 !important;
}
.navbar-pdv-buttons .btn-info.navbar-pdv-btn,
.navbar-pdv-buttons a.btn-info {
    color: #fff !important;
}
.navbar-pdv-buttons .btn-info.navbar-pdv-btn:hover,
.navbar-pdv-buttons a.btn-info:hover {
    color: #000 !important;
}

/* ==================================================
   SIDEBAR V2 - Redesign completo (estrutura + visual)
   ================================================== */

#menu.sidebar {
    width: 286px !important;
    position: fixed !important;
    top: var(--admin-header-height, 57px) !important;
    bottom: 0 !important;
    left: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    background:
        radial-gradient(140% 85% at 0% 0%, rgba(86, 182, 255, 0.28) 0%, rgba(86, 182, 255, 0) 52%),
        radial-gradient(120% 85% at 100% 100%, rgba(51, 224, 187, 0.22) 0%, rgba(51, 224, 187, 0) 60%),
        linear-gradient(180deg, #091428 0%, #0e1d33 44%, #111f39 100%) !important;
    box-shadow: 12px 0 30px rgba(3, 12, 27, 0.35) !important;
}

body.dashboard #wrapper {
    position: relative;
    z-index: 1;
}

.sidebar-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px 12px 10px;
}

.sidebar-brand {
    margin-bottom: 12px;
}

.sidebar-workspace-hub {
    margin: 0 0 12px !important;
    position: relative;
}

.sidebar-workspace-hub__trigger {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    margin-top: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
}

.sidebar-workspace-hub__trigger:hover,
.sidebar-workspace-hub__trigger:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
    text-decoration: none !important;
    color: inherit !important;
}

.sidebar-workspace-hub.is-open .sidebar-workspace-hub__caret,
.sidebar-workspace-hub__trigger[aria-expanded="true"] .sidebar-workspace-hub__caret {
    transform: rotate(180deg);
}

.sidebar-workspace-hub__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-workspace-hub__avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-workspace-hub__avatar img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    display: block;
}
.sidebar-workspace-hub__avatar.is-fallback img {
    display: none !important;
}
.sidebar-workspace-hub__avatar.is-fallback::before {
    content: "\f007";
    font-family: FontAwesome, "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.sidebar-workspace-hub__meta {
    min-width: 0;
}

.sidebar-workspace-hub__title {
    display: block;
    color: #f5f9ff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 150px;
}

.sidebar-workspace-hub__subtitle {
    display: block;
    color: rgba(215, 231, 255, 0.78);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    max-width: 150px;
}

.sidebar-workspace-hub__caret {
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-workspace-hub__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    border-radius: 12px !important;
    border: 1px solid #d6e1f1 !important;
    padding: 0 !important;
    min-width: 100% !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}
.sidebar-workspace-hub.is-open .sidebar-workspace-hub__menu {
    display: block;
}
.sidebar-workspace-hub__menu[hidden] {
    display: none !important;
}
.sidebar-workspace-hub.is-open .sidebar-workspace-hub__menu[hidden] {
    display: block !important;
}
.sidebar-workspace-hub__panel {
    padding: 12px !important;
    background: linear-gradient(145deg, rgba(9, 20, 40, 0.04), rgba(9, 20, 40, 0.01));
}
.sidebar-workspace-hub__links {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e2e8f0;
}
.sidebar-workspace-hub__links li a {
    display: block;
    padding: 10px 14px;
    color: #0f172a;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
}
.sidebar-workspace-hub__links li a:hover,
.sidebar-workspace-hub__links li a.active {
    background: #f1f5f9;
}
.sidebar-workspace-hub__lang {
    padding: 10px 14px 12px;
    border-top: 1px solid #e2e8f0;
}
.sidebar-workspace-hub__lang > span {
    display: block;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 8px;
}
.sidebar-workspace-hub__lang-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.sidebar-workspace-hub__lang-list a {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #dbe2ea;
    color: #334155;
    text-decoration: none !important;
    font-size: 12px;
}
.sidebar-workspace-hub__lang-list a.active,
.sidebar-workspace-hub__lang-list a:hover {
    background: #eef2ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.sidebar-workspace-hub__brand {
    border: 1px solid rgba(9, 20, 40, 0.08);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(9, 20, 40, 0.04);
    margin-bottom: 10px;
}

.sidebar-workspace-hub__brand-title {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
}

.sidebar-workspace-hub__brand-subtitle {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
}

.sidebar-workspace-hub__profile {
    margin-bottom: 10px;
}

.sidebar-workspace-hub__profile-name {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-workspace-hub__profile-email {
    display: block;
    color: #64748b;
    font-size: 11px;
    word-break: break-all;
}

.sidebar-workspace-hub__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sidebar-workspace-hub__action-btn {
    border: 1px solid rgba(9, 20, 40, 0.12);
    border-radius: 10px;
    color: #0f172a;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #f8fafc;
}

.sidebar-workspace-hub__action-btn:hover,
.sidebar-workspace-hub__action-btn:focus {
    color: #0f172a;
    text-decoration: none;
    background: #eef2ff;
    border-color: rgba(37, 99, 235, 0.25);
}

.sidebar-brand__chip {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 12px 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(5px);
}

.sidebar-brand__title {
    display: block;
    color: #f2f7ff;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sidebar-brand__subtitle {
    display: block;
    margin-top: 3px;
    color: rgba(208, 227, 255, 0.82);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 600;
}

.sidebar-user-card {
    margin: 0 0 10px !important;
}

.sidebar-user-card__trigger.profile {
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    margin-top: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

.sidebar-user-card__trigger.profile:hover,
.sidebar-user-card__trigger.profile:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
}

.sidebar-user-card__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-user-card__avatar img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-user-card__meta {
    min-width: 0;
}

.sidebar-user-card__name {
    display: block;
    color: #f5f9ff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-card__email {
    display: block;
    color: rgba(215, 231, 255, 0.78);
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-card__caret {
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
}

.sidebar-user-card .dropdown-menu {
    border-radius: 10px;
    border: 1px solid #d6e1f1;
}

.sidebar-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-quick-actions__btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    color: #e4f0ff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 9px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-quick-actions__btn:hover,
.sidebar-quick-actions__btn:focus {
    color: #ffffff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.26);
}

.sidebar-nav-title {
    margin: 4px 2px 8px;
    color: rgba(214, 231, 255, 0.8);
    font-size: 10px;
    letter-spacing: 0.16em;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.sidebar-nav-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 10px;
}

#menu.sidebar ul#side-menu.nav {
    margin-top: 0 !important;
    padding-bottom: 26px;
}

#menu.sidebar ul#side-menu.nav > li {
    border: 0 !important;
    margin-bottom: 4px;
}

#menu.sidebar ul#side-menu.nav > li > a {
    border-radius: 12px !important;
    border: 1px solid transparent !important;
    color: rgba(233, 244, 255, 0.92) !important;
    font-size: 14px !important;
    line-height: 1.25;
    font-weight: 600 !important;
    padding: 11px 13px !important;
    margin-top: 0 !important;
    transition: all 0.2s ease;
}

#menu.sidebar ul#side-menu.nav > li > a .menu-icon {
    width: 20px !important;
    margin-right: 11px !important;
    font-size: 16px !important;
    color: rgba(222, 239, 255, 0.92) !important;
}

#menu.sidebar ul#side-menu.nav > li > a .arrow {
    color: rgba(224, 240, 255, 0.88) !important;
    padding-top: 1px;
}

#menu.sidebar ul#side-menu.nav > li:hover > a,
#menu.sidebar ul#side-menu.nav > li.active > a,
#menu.sidebar ul#side-menu.nav > li.mm-active > a {
    color: #ffffff !important;
    border-color: rgba(127, 218, 255, 0.56) !important;
    background:
        linear-gradient(130deg, rgba(75, 197, 255, 0.32) 0%, rgba(70, 128, 255, 0.26) 58%, rgba(88, 215, 206, 0.24) 100%) !important;
    box-shadow: 0 6px 16px rgba(4, 34, 76, 0.32);
}

#menu.sidebar ul#side-menu.nav > li > ul.nav-second-level,
#menu.sidebar ul#side-menu.nav > li > ul.nav-third-level {
    margin: 6px 0 8px;
    padding: 8px 7px;
    border-radius: 12px;
    background: rgba(3, 15, 30, 0.34) !important;
    border: 1px solid rgba(133, 186, 245, 0.18);
}

#menu.sidebar ul#side-menu.nav .nav-second-level > li > a,
#menu.sidebar ul#side-menu.nav .nav-third-level > li > a {
    border-radius: 9px;
    margin: 2px 0;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    border: 1px solid transparent !important;
    color: rgba(223, 237, 255, 0.86) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

#menu.sidebar ul#side-menu.nav .nav-second-level > li > a {
    padding-left: 14px !important;
}

#menu.sidebar ul#side-menu.nav .nav-third-level > li > a {
    padding-left: 28px !important;
}

#menu.sidebar ul#side-menu.nav .nav-second-level > li > a .menu-icon,
#menu.sidebar ul#side-menu.nav .nav-third-level > li > a .menu-icon {
    width: 18px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

#menu.sidebar ul#side-menu.nav .nav-second-level > li.active > a,
#menu.sidebar ul#side-menu.nav .nav-third-level > li.active > a,
#menu.sidebar ul#side-menu.nav .nav-second-level > li > a:hover,
#menu.sidebar ul#side-menu.nav .nav-third-level > li > a:hover {
    color: #ffffff !important;
    background: rgba(91, 185, 255, 0.24) !important;
    border-color: rgba(125, 211, 255, 0.42) !important;
}

#menu.sidebar #setup-menu-item > a {
    border-style: dashed !important;
}

body.hide-sidebar:not(.show-sidebar) #menu {
    margin-left: -286px !important;
}

body.page-small #menu {
    margin-left: -286px !important;
}

body.page-small.show-sidebar #wrapper,
body.show-sidebar #wrapper {
    margin-left: 286px;
}

#wrapper {
    margin-left: 286px;
}

@media (max-width: 1024px) {
    body.show-sidebar #wrapper,
    body.page-small.show-sidebar #wrapper,
    #wrapper {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    #setup-menu-wrapper.display-block {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        top: var(--admin-header-height, 57px) !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: min(88vw, 312px) !important;
        z-index: 1302 !important;
    }

    body.page-small:not(.setup-menu-open-mobile) #setup-menu-wrapper,
    body.page-small.show-sidebar:not(.setup-menu-open-mobile) #setup-menu-wrapper,
    body.show-sidebar:not(.setup-menu-open-mobile) #setup-menu-wrapper {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.page-small #setup-menu-wrapper.display-block,
    body.page-small.show-sidebar #setup-menu-wrapper.display-block,
    body.show-sidebar #setup-menu-wrapper.display-block {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        top: var(--admin-header-height, 57px) !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: min(88vw, 312px) !important;
        height: auto !important;
        z-index: 1301 !important;
        box-shadow: -16px 0 40px rgba(0, 10, 26, 0.45) !important;
    }

    body.setup-menu-open-mobile #setup-menu-wrapper.display-block {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        position: fixed !important;
        top: var(--admin-header-height, 57px) !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        width: min(88vw, 312px) !important;
        z-index: 1302 !important;
    }

    body.setup-menu-open-mobile #wrapper:after {
        z-index: 1201 !important;
        background: rgba(5, 11, 24, 0.56) !important;
    }

    body.page-small.show-sidebar #menu,
    body.show-sidebar #menu,
    body.show-sidebar aside#menu.sidebar {
        position: fixed !important;
        top: var(--admin-header-height, 57px) !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(88vw, 312px) !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin-left: 0 !important;
        overflow: hidden !important;
        z-index: 1200 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.16) !important;
        box-shadow: 16px 0 40px rgba(0, 10, 26, 0.45) !important;
    }

    body.page-small.show-sidebar #menu .sidebar-shell,
    body.show-sidebar #menu .sidebar-shell {
        height: 100% !important;
        min-height: 0 !important;
    }

    body.page-small.show-sidebar #menu .sidebar-nav-scroll,
    body.show-sidebar #menu .sidebar-nav-scroll {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }

    body.show-sidebar #wrapper:after,
    body.page-small.show-sidebar #wrapper:after {
        z-index: 1100 !important;
        background: rgba(5, 11, 24, 0.56) !important;
    }

    .sidebar-shell {
        padding: 12px 10px 8px;
    }

    .sidebar-nav-scroll {
        padding-right: 0;
    }
}

    /* ---- Modal premium: Adicionar Novo Item (invoice_items) ---- */
    #sales_item_modal {
        font-family: 'Poppins', 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    }

    @media (min-width: 992px) {
        #sales_item_modal .modal-dialog {
            width: 1140px;
        }
    }

    @media (min-width: 1280px) {
        #sales_item_modal .modal-dialog {
            width: 1240px;
        }
    }

    #sales_item_modal .modal-content {
        border: 0;
        border-radius: 16px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(135deg, #f8fafc, #eef2ff);
        box-shadow: 0 20px 55px rgba(15, 23, 42, 0.2);
    }

    #sales_item_modal .modal-header {
        border-bottom: 1px solid #e5e7eb;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(4px);
        padding: 18px 24px;
    }

    #sales_item_modal .modal-title {
        color: #111827;
        font-size: 20px;
        font-weight: 700;
        letter-spacing: -0.01em;
    }

    #sales_item_modal .close {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background: #fff;
        opacity: 1;
        margin-top: 0;
        transition: all 0.22s ease;
    }

    #sales_item_modal .close:hover {
        background: #f3f4f6;
        border-color: #c7d2fe;
    }

    #sales_item_modal .modal-body {
        max-height: 72vh;
        overflow-y: auto;
        padding: 20px 22px 16px;
        background: linear-gradient(135deg, #f8fafc, #eef2ff);
    }

    #sales_item_modal .alert.affect-warning {
        border-radius: 12px;
        border: 1px solid #fde68a;
        background: #fffbeb;
        color: #92400e;
    }

    #sales_item_modal .item-saas-card {
        background: #fff;
        border-radius: 14px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
        padding: 16px;
        margin-bottom: 14px;
    }

    #sales_item_modal .item-saas-card.item-saas-card-soft {
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    #sales_item_modal .item-card-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
    }

    #sales_item_modal .item-card-title {
        margin: 0;
        color: #0f172a;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.01em;
        text-transform: uppercase;
    }

    #sales_item_modal .item-card-note {
        margin: 0;
        color: #64748b;
        font-size: 12px;
        font-weight: 500;
    }

    #sales_item_modal .row-tight > [class*='col-'] {
        padding-left: 8px;
        padding-right: 8px;
    }

    #sales_item_modal .row-tight {
        margin-left: -8px;
        margin-right: -8px;
    }

    #sales_item_modal .form-group {
        margin-bottom: 14px;
    }

    #sales_item_modal .control-label,
    #sales_item_modal label {
        color: #334155;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.01em;
        margin-bottom: 6px;
    }

    #sales_item_modal .form-control,
    #sales_item_modal .bootstrap-select > .dropdown-toggle {
        border: 1px solid #d1d5db;
        border-radius: 10px;
        height: 42px;
        line-height: 1.35;
        font-size: 14px;
        color: #111827;
        box-shadow: none;
        background: #fff;
        transition: all 0.24s ease;
    }

    #sales_item_modal textarea.form-control {
        height: auto;
        min-height: 92px;
        border-radius: 12px;
        resize: vertical;
    }

    #sales_item_modal .form-control:hover,
    #sales_item_modal .bootstrap-select > .dropdown-toggle:hover {
        border-color: #a5b4fc;
        background: #fbfdff;
    }

    #sales_item_modal .form-control:focus,
    #sales_item_modal .bootstrap-select > .dropdown-toggle:focus,
    #sales_item_modal .bootstrap-select.open > .dropdown-toggle {
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
        outline: 0;
    }

    #sales_item_modal .item-wizard-steps {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin: 0 0 14px;
    }

    #sales_item_modal .item-wizard-step {
        border: 1px solid #cbd5e1;
        border-radius: 999px;
        padding: 8px 13px;
        font-size: 12px;
        font-weight: 700;
        background: #fff;
        color: #475569;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    #sales_item_modal .item-wizard-step:hover {
        border-color: #a5b4fc;
        color: #4338ca;
    }

    #sales_item_modal .item-wizard-step.active {
        background: #4f46e5;
        color: #fff;
        border-color: #4f46e5;
        box-shadow: 0 6px 18px rgba(79, 70, 229, 0.27);
    }

    #sales_item_modal .item-wizard-step.done {
        background: #eef2ff;
        color: #4338ca;
        border-color: #c7d2fe;
    }

    #sales_item_modal .item-section-toggle {
        display: block;
        border: 1px solid #dbe3ec;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
        color: #1f2937;
        font-weight: 600;
        background: #f8fafc;
        text-decoration: none !important;
    }

    #sales_item_modal .item-section-toggle .caret {
        margin-top: 7px;
    }

    #sales_item_modal .item-image-preview-wrap {
        border: 1px dashed #c7d2fe;
        border-radius: 14px;
        padding: 16px;
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        text-align: center;
        margin-bottom: 10px;
    }

    #sales_item_modal .item-image-preview {
        width: 170px;
        height: 170px;
        object-fit: cover;
        border-radius: 14px;
        border: 1px solid #dbeafe;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    }

    #sales_item_modal .item-step-pane {
        display: none;
    }

    #sales_item_modal .item-step-pane.active {
        display: block;
    }

    #sales_item_modal #btn-add-variation-group,
    #sales_item_modal #item_upload_trigger {
        border-radius: 10px;
        border: 1px solid #c7d2fe;
        background: #eef2ff;
        color: #3730a3;
        font-weight: 600;
        transition: all 0.22s ease;
    }

    #sales_item_modal #btn-add-variation-group:hover,
    #sales_item_modal #item_upload_trigger:hover {
        background: #4f46e5;
        border-color: #4f46e5;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(79, 70, 229, 0.2);
    }

    #sales_item_modal #item_default_image {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    #sales_item_modal .item-ghost-note {
        margin: 8px 0 0;
        color: #64748b;
        font-size: 12px;
    }

    #sales_item_modal .item-wizard-footer {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    #sales_item_modal .item-wizard-counter {
        font-size: 12px;
        font-weight: 700;
        color: #6366f1;
        background: #eef2ff;
        border: 1px solid #c7d2fe;
        border-radius: 999px;
        padding: 7px 12px;
    }

    #sales_item_modal .modal-footer {
        background: #fff;
        border-top: 1px solid #e5e7eb;
        padding: 14px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
    }

    #sales_item_modal .item-wizard-footer.modal-bottom {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        flex: 1 1 auto;
    }

    #sales_item_modal .modal-footer .actions-right {
        margin-left: auto;
        display: flex;
        gap: 8px;
    }

    #sales_item_modal .modal-footer .btn {
        border-radius: 10px;
        height: 40px;
        padding: 0 14px;
        font-weight: 600;
        transition: all 0.22s ease;
    }

    #sales_item_modal #itemWizardPrev {
        background: #fff;
        border: 1px solid #d1d5db;
        color: #334155;
    }

    #sales_item_modal #itemWizardPrev:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }

    #sales_item_modal #itemWizardNext {
        background: #eef2ff;
        border-color: #c7d2fe;
        color: #3730a3;
    }

    #sales_item_modal #itemWizardNext:hover {
        background: #4f46e5;
        border-color: #4f46e5;
        color: #fff;
        box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
    }

    #sales_item_modal .actions-right .btn[data-dismiss='modal'] {
        border: 1px solid #d1d5db;
        background: #fff;
        color: #475569;
    }

    #sales_item_modal .actions-right .btn[data-dismiss='modal']:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }

    #sales_item_modal .item-btn-save {
        background: linear-gradient(135deg, #4f46e5, #4338ca);
        border: 0;
        color: #fff;
        box-shadow: 0 10px 22px rgba(79, 70, 229, 0.3);
    }

    #sales_item_modal .item-btn-save:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(79, 70, 229, 0.36);
    }

    #sales_item_modal .item-subtle-row {
        padding-top: 4px;
    }

    #sales_item_modal .item-subtle-row .control-label {
        font-size: 11px;
        color: #64748b;
    }

    @media (max-width: 991px) {
        #sales_item_modal .modal-body {
            max-height: 78vh;
            padding: 14px 12px;
        }

        #sales_item_modal .item-image-preview {
            width: 132px;
            height: 132px;
        }

        #sales_item_modal .modal-footer {
            padding: 12px;
        }

        #sales_item_modal .modal-footer .actions-right {
            width: 100%;
            justify-content: flex-end;
        }

        #sales_item_modal .item-wizard-counter {
            order: 3;
            width: 100%;
            text-align: center;
        }
    }

    @media (max-width: 767px) {
        #sales_item_modal .item-wizard-step {
            width: 100%;
            text-align: left;
        }

        #sales_item_modal .modal-footer .actions-right,
        #sales_item_modal .item-wizard-footer {
            width: 100%;
        }

        #sales_item_modal .modal-footer .actions-right .btn,
        #sales_item_modal .item-wizard-footer .btn {
            flex: 1 1 auto;
        }
    }

    #item_modal_fetch_overlay {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: 5;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }

    #item_modal_fetch_overlay.item-modal-overlay-visible {
        display: flex;
    }

/* Oficina — ajustes mobile no painel admin */
@media (max-width: 991px) {
    body.oficina #wrapper .content {
        padding: 12px 10px 24px !important;
        position: relative;
        z-index: 2;
    }

    body.oficina .modal-dialog {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        margin: 10px auto !important;
    }

    body.oficina .bootstrap-select.btn-group .dropdown-toggle,
    body.oficina .bootstrap-select .dropdown-menu {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body.hide-sidebar:not(.show-sidebar) #menu.sidebar,
    body.page-small:not(.show-sidebar) #menu.sidebar {
        transform: translateX(-105%) !important;
        pointer-events: none !important;
        visibility: hidden !important;
    }

    body.show-sidebar #menu.sidebar,
    body.page-small.show-sidebar #menu.sidebar {
        transform: translateX(0) !important;
        pointer-events: auto !important;
        visibility: visible !important;
    }

    body:not(.show-sidebar) #wrapper:after,
    body.hide-sidebar:not(.show-sidebar) #wrapper:after,
    body.page-small:not(.show-sidebar) #wrapper:after {
        content: none !important;
        display: none !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
}

/* Remove o topo inteiro (logo, busca, +, suporte, relatórios, config e ícones) */
html, body {
    --admin-header-height: 0px;
}
#header,
#header.admin-premium-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    box-shadow: none !important;
}
#wrapper {
    padding-top: 0 !important;
}
#menu.sidebar {
    top: 0 !important;
}
#setup-menu-wrapper {
    top: 0 !important;
}
.admin-sidebar-fab {
    position: fixed;
    top: 12px;
    left: 298px;
    z-index: 1040;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9e3f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    box-shadow: 0 10px 22px rgba(148, 163, 184, 0.22);
    color: #334155;
    cursor: pointer;
}
.admin-sidebar-fab:hover,
.admin-sidebar-fab:focus {
    color: #0f172a;
    outline: none;
}
body.hide-sidebar:not(.show-sidebar) .admin-sidebar-fab,
body.page-small:not(.show-sidebar) .admin-sidebar-fab {
    left: 12px;
}
@media (max-width: 1024px) {
    .admin-sidebar-fab {
        left: 12px;
    }
}

/* Definições: o painel abre na mesma posição da sidebar e ficava atrás dela. */
#setup-menu-wrapper.display-block,
#setup-menu-wrapper.fadeInLeft,
#setup-menu-wrapper.fadeInRight,
body.setup-menu-open-mobile #setup-menu-wrapper,
body.setup-menu-visible #setup-menu-wrapper {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 286px !important;
    z-index: 1400 !important;
}
body.setup-menu-visible #menu.sidebar {
    z-index: 40 !important;
}

