/* Estilos principais (limpo / refatorado) */
:root {
    --sidebar-bg: #121212; /* restaurado escuro */
    --sidebar-hover: rgba(108,93,211,0.10);
    --primary: #0d6efd;
    --accent: #6C5DD3; /* roxo anterior */
    --muted: rgba(255,255,255,0.72);
    --muted-2: rgba(255,255,255,0.6);
    --success: #198754;
    --info: #0dcaf0;
    --warning: #ffc107;
    --danger: #dc3545;
    --border-color: #222; /* menos contraste em dark */
}

body { overflow-x: hidden; }

/* Grid de ações padrão (usada na dashboard e replicada nos módulos) */
.actions-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:1rem; margin:1rem 0 1.5rem; }
.action-item { background:#1d1d1f; border:1px solid #2a2a2d; border-radius:14px; padding:1rem 1rem; cursor:pointer; display:flex; align-items:center; gap:0.75rem; transition:background .18s ease,border-color .18s ease, transform .18s ease, box-shadow .18s ease; position:relative; overflow:hidden; }
.action-item i { flex:0 0 auto; width:38px; height:38px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:rgba(255,255,255,0.04); font-size:1.35rem; }
.action-item span { font-weight:500; color:var(--muted); letter-spacing:.3px; }
.action-item:before { content:""; position:absolute; inset:0; background:linear-gradient(135deg, rgba(108,93,211,0.08), rgba(108,93,211,0)); opacity:0; transition:opacity .25s; }
.action-item:hover { background:#242428; border-color:rgba(108,93,211,0.55); transform:translateY(-3px); box-shadow:0 6px 20px -4px rgba(0,0,0,0.55); }
.action-item:hover:before { opacity:1; }
.action-item:hover span { color:#ffffff; }
.action-item:hover i { background:rgba(108,93,211,0.18); color:#ffffff; }
.action-item:active { transform:translateY(-1px) scale(.98); }
.action-item:focus { outline:none; box-shadow:0 0 0 2px rgba(108,93,211,0.55); }

/* Sidebar */
.sidebar {
    background-color: var(--sidebar-bg);
    min-height: 100vh;
    padding-top: 1rem;
    width: 260px;
    border-right: 1px solid #1e1e1e;
}
.sidebar .brand {
    font-size: 1.35rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: .5px;
}
.sidebar a {
    color: var(--muted);
    text-decoration: none;
    display: block;
    padding: 0.55rem 0.75rem;
    transition: all 0.18s ease;
    border-radius: 8px;
    font-weight: 500;
    position: relative;
}
.sidebar a:hover { background: var(--sidebar-hover); color: #ffffff; }

/* Menu Items / estado ativo */
.menu-item { margin-bottom: 0.25rem; }
.menu-item > a { display: flex !important; align-items: center; justify-content: space-between; }
.menu-item > a i.toggle { transition: transform 0.3s; }
.menu-item.active > a {
    background: rgba(108,93,211,0.15);
    color:#ffffff !important;
    box-shadow: 0 0 0 1px rgba(108,93,211,0.5), 0 4px 14px -2px rgba(0,0,0,0.45);
    border: 1px solid rgba(108,93,211,0.45);
}
.menu-item.active > a:before { content:''; position:absolute; left:-6px; top:50%; transform:translateY(-50%); width:4px; height:70%; border-radius:4px; background:var(--accent); }
.menu-item.active > a i { color: var(--accent) !important; }
.menu-item:hover { transform: translateX(4px); background: var(--sidebar-hover); color:#ffffff; }
.menu-item i { font-size:1.15rem; margin-right:0.75rem; color:var(--muted-2); transition:color .15s; }
.menu-item:hover i { color: var(--accent); }
.sidebar a.active { background: rgba(108,93,211,0.18); color:#ffffff; box-shadow: 0 0 0 1px rgba(108,93,211,0.5), 0 4px 14px -2px rgba(0,0,0,0.45); border:1px solid rgba(108,93,211,0.45); }

/* Submenu */
.submenu { margin-left:0.75rem; padding-left:0.9rem; border-left:2px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.04); border-radius:4px; display:none; }
.menu-item.active .submenu { display:block; }
.submenu a { padding:0.45rem 0.5rem; font-size:0.9rem; color:var(--muted-2); display:block; }
.submenu a:hover { color:#ffffff; background:rgba(255,255,255,0.06); }

/* Padrão de botões em cards (estilo OS): base branca, borda escura, hover roxo; usar .action-link.primary para botão destacado */
.action-link { display:flex; align-items:center; gap:0.75rem; padding:0.9rem 1.1rem; margin-bottom:0.85rem; background:#ffffff; border:1px solid #000; color:#1d1d1f; border-radius:8px; width:100%; text-decoration:none; font-weight:500; transition:background .18s ease,border-color .18s ease,color .12s ease, box-shadow .18s ease; }
.action-link i { color:#4a4a4a; min-width:24px; text-align:center; font-size:1rem; }
.action-link:hover { background:var(--accent); border-color:var(--accent); color:#ffffff; box-shadow:0 4px 18px -4px rgba(108,93,211,0.45); }
.action-link:hover i { color:#ffffff; }
.action-link:focus { outline:none; box-shadow:0 0 0 2px rgba(108,93,211,0.55); }
.action-link:active { transform:translateY(1px); }
/* Estado ativo opcional se quiser destacar via JS */
.action-link.is-active { background:var(--accent); border-color:var(--accent); color:#ffffff; box-shadow:0 4px 16px -4px rgba(108,93,211,0.55); }
.action-link.is-active i { color:#ffffff; }
.action-link.is-active:hover { background:#5b4ac4; border-color:#5b4ac4; }

/* Section cards grid */
.section-cards { display:grid; grid-template-columns:repeat(3,1fr); gap:1.5rem; margin-top:1rem; }
.two-column-cards { grid-template-columns:repeat(2,1fr); }
.section-card { background:#ffffff; border:1px solid #ececec; border-radius:10px; padding:1.5rem; }
.section-card h4 { margin:0 0 0.5rem 0; font-size:1.1rem; font-weight:600; }
.section-card p { margin:0 0 1rem 0; color:#6c757d; font-size:0.95rem; }
.section-card .action-area { background:transparent; padding-top:0.5rem; }
.section-card .action-link { display:flex; align-items:center; gap:0.75rem; padding:0.85rem 1rem; margin-bottom:0.9rem; background:#ffffff; border:1px solid #000000; color:#212529; border-radius:10px; width:100%; transition:background .18s ease,border-color .18s ease,color .12s ease; }
.section-card .action-link i { color:#495057; min-width:28px; text-align:center; }
.section-card .action-link:hover { background:var(--accent); color:#ffffff; border-color:var(--accent); }
.section-card .action-link:hover i { color:#ffffff; }

/* Focus state limpando aninhamento inválido */
.section-card .action-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(108,93,211,0.4);
}

/* Vendas Rápidas - resumo */
.summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.summary-row .summary-card {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 1rem;
}

.summary-row .label {
    font-size: 0.9rem;
    color: #6c757d;
}

.summary-row .value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.text-accent {
    color: var(--accent);
}

.two-column-cards {
    grid-template-columns: repeat(2, 1fr);
}

/* Content */
.content {
    padding: 2rem;
}

/* Cards */
.card-custom {
    transition: transform 0.2s;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-custom:hover {
    transform: translateY(-5px);
}

/* Dashboard action tiles: subtle border to match design */
.action-card {
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.summary-card {
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: bold;
}

.summary-card .label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Dashboard sections */
.dashboard-section {
    margin-bottom: 2rem;
}

.dashboard-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Menu List */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}

/* (removido: regras antigas de menu-item conflitantes com nova versão no topo) */

/* Action Links */
/* (removido: action-link genérico duplicado; usamos o dentro de .section-card) */

/* Active Menu State */
/* (removidos: estilos antigos de active para tema escuro) */

/* Responsive */
@media (max-width: 992px) {
    .section-cards {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar a i {
        margin-right: 0.875rem;
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
        color: rgba(255,255,255,0.6);
    }

    .sidebar a:hover i {
        color: #ffffff;
    }
}

iframe {
    width: 100%;
    border: none;
    background: rgb(36, 33, 33);
}

/* Iframe loader overlay */
.iframe-wrapper { position: relative; }
.iframe-loader {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.6);
    z-index: 10;
}
/* (restored to original theme - no appended overrides) */