/* ============================================================
   Camada de design

   Suaviza o visual Material do MudBlazor sobrescrevendo as próprias
   variáveis CSS que ele expõe — assim vale para todos os componentes
   de uma vez, sem precisar ajustar tela por tela.
   ============================================================ */

:root {
    --fonte-app: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

    /* Roboto é a fonte do Material Design: trocá-la é o que mais muda a "cara". */
    --mud-typography-default-family: var(--fonte-app);
    --mud-typography-body1-family: var(--fonte-app);
    --mud-typography-body2-family: var(--fonte-app);
    --mud-typography-button-family: var(--fonte-app);
    --mud-typography-caption-family: var(--fonte-app);
    --mud-typography-overline-family: var(--fonte-app);
    --mud-typography-subtitle1-family: var(--fonte-app);
    --mud-typography-subtitle2-family: var(--fonte-app);
    --mud-typography-h1-family: var(--fonte-app);
    --mud-typography-h2-family: var(--fonte-app);
    --mud-typography-h3-family: var(--fonte-app);
    --mud-typography-h4-family: var(--fonte-app);
    --mud-typography-h5-family: var(--fonte-app);
    --mud-typography-h6-family: var(--fonte-app);

    /* CAIXA ALTA nos botões é a marca registrada do Material. */
    --mud-typography-button-text-transform: none;

    --mud-default-borderradius: 10px;

    /* Tons de apoio, para as telas não repetirem hex solto. */
    --borda-sutil: #e8edf2;
    --texto-fraco: #6b7b8a;
    --sombra-card: 0 1px 2px rgba(16, 36, 64, 0.04), 0 4px 16px rgba(16, 36, 64, 0.05);
    --sombra-card-hover: 0 2px 4px rgba(16, 36, 64, 0.06), 0 12px 28px rgba(21, 101, 192, 0.12);
}

html, body {
    font-family: var(--fonte-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------------- Botões ---------------- */

.mud-button-root {
    border-radius: 10px;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

/* Material usa elevação (sombra) nos botões; o visual atual é plano. */
.mud-button-filled {
    box-shadow: none;
}

.mud-button-filled:hover {
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.24);
}

.mud-button-outlined {
    border-width: 1px;
}

.mud-icon-button {
    border-radius: 10px;
}

/* O ripple é o gesto mais característico do Material. */
.mud-ripple-effect {
    display: none !important;
}

/* ---------------- Superfícies ---------------- */

.mud-paper:not(.mud-appbar):not(.mud-drawer) {
    border-radius: 14px;
}

.mud-dialog {
    border-radius: 18px;
}

.mud-dialog-title {
    padding-bottom: 8px;
}

/* Barra superior e menu lateral: linha fina no lugar de sombra. */
.mud-appbar {
    box-shadow: none !important;
}

.mud-drawer {
    border-right: 1px solid var(--borda-sutil);
    box-shadow: none !important;
}

.mud-nav-link {
    border-radius: 10px;
    margin: 2px 8px;
    font-weight: 500;
}

/* ---------------- Formulários ---------------- */

.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: 10px;
}

.mud-input-control .mud-input-label {
    font-weight: 500;
}

/* ---------------- Tabelas e chips ---------------- */

.mud-table-container th,
.mud-table-head th {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.mud-chip {
    border-radius: 999px;
    font-weight: 500;
}

/* ============================================================
   Blazor / validação
   ============================================================ */

a, .btn-link {
    color: #1565c0;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 12px;
}

.blazor-error-boundary::after {
    content: "Ocorreu um erro.";
}

/* ============================================================
   Moldura do backoffice (MainLayout) — mesmo visual do editor
   da Personalização: superfícies brancas, linha fina, ícones FA.
   ============================================================ */

:root {
    --sh-lado: 252px;
    --sh-lado-recolhido: 76px;
    --sh-topo: 64px;
    --sh-fundo: #f4f6f8;
    --sh-linha: #e3e7eb;
    --sh-texto: #1b1f23;
    --sh-fraco: #6b7680;
    --sh-realce: color-mix(in srgb, var(--mud-palette-primary) 10%, #fff);
}

body { background: var(--sh-fundo); }

.sh { display: flex; min-height: 100vh; min-height: 100dvh; background: var(--sh-fundo); color: var(--sh-texto); }

/* ---------- menu lateral ---------- */
.sh-lado {
    position: sticky; top: 0; height: 100vh; height: 100dvh; width: var(--sh-lado); flex-shrink: 0; z-index: 30;
    display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--sh-linha);
    transition: width .2s ease;
}
.sh-marca { display: flex; align-items: center; gap: 12px; height: var(--sh-topo); padding: 0 18px; flex-shrink: 0;
    color: inherit !important; text-decoration: none; border-bottom: 1px solid var(--sh-linha); overflow: hidden; }
.sh-marca-logo { width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--sh-linha); box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.sh-marca-logo img { width: 28px; height: 28px; object-fit: contain; }
.sh-marca-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sh-marca-txt b { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.sh-marca-txt small { font-size: 12px; color: var(--sh-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sh-nav { flex: 1; overflow-y: auto; padding: 8px 12px 12px; scrollbar-width: thin; }
.sh-secao { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a96a1; padding: 18px 10px 6px; white-space: nowrap; }
.sh-item {
    position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; margin: 2px 0; border-radius: 10px;
    color: #45515c !important; text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: background .15s, color .15s;
}
.sh-item i { width: 20px; text-align: center; font-size: 15.5px; color: #7d8994; transition: color .15s; flex-shrink: 0; }
.sh-item span { overflow: hidden; text-overflow: ellipsis; }
.sh-item:hover { background: #f3f5f7; color: var(--sh-texto) !important; }
.sh-item:hover i { color: var(--sh-texto); }
.sh-item.ativo { background: var(--sh-realce); color: var(--mud-palette-primary) !important; font-weight: 600; }
.sh-item.ativo i { color: var(--mud-palette-primary); }
.sh-item.ativo::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mud-palette-primary); }
.sh-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; background: #ef6c00; color: #fff;
    font-style: normal; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.sh-lado-fim { padding: 12px; border-top: 1px solid var(--sh-linha); display: flex; flex-direction: column; gap: 8px; }
.sh-vitrine { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; text-decoration: none; overflow: hidden;
    color: var(--sh-texto) !important; background: linear-gradient(135deg, var(--sh-realce), #fff); border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 18%, #fff); }
.sh-vitrine:hover { border-color: var(--mud-palette-primary); }
.sh-vitrine > i { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; background: #fff; color: var(--mud-palette-primary);
    display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.sh-vitrine span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sh-vitrine b { font-size: 13px; }
.sh-vitrine small { font-size: 11.5px; color: var(--sh-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-recolher { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border: 0; border-radius: 10px; background: none;
    color: var(--sh-fraco); font: 500 13px/1 var(--fonte-app); cursor: pointer; white-space: nowrap; overflow: hidden; justify-content: flex-start; }
.sh-recolher i { width: 20px; text-align: center; }
.sh-recolher:hover { background: #f3f5f7; color: var(--sh-texto); }

/* recolhido: só os ícones */
.sh-recolhido .sh-lado { width: var(--sh-lado-recolhido); }
.sh-recolhido .sh-marca { padding: 0 20px; }
.sh-recolhido .sh-marca-txt, .sh-recolhido .sh-item span, .sh-recolhido .sh-vitrine span, .sh-recolhido .sh-recolher span { display: none; }
.sh-recolhido .sh-secao { padding: 14px 0 4px; text-align: center; }
.sh-recolhido .sh-secao span { display: block; height: 1px; background: var(--sh-linha); margin: 0 8px; font-size: 0; }
.sh-recolhido .sh-item { justify-content: center; padding: 0; }
.sh-recolhido .sh-badge { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 16px; font-size: 10px; padding: 0 5px; }
.sh-recolhido .sh-vitrine { justify-content: center; padding: 10px 0; }
.sh-recolhido .sh-recolher { justify-content: center; padding: 0; }

/* ---------- topo ---------- */
.sh-principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sh-topo {
    position: sticky; top: 0; z-index: 20; height: var(--sh-topo); flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 24px;
    background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--sh-linha);
}
.sh-alternar { display: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: var(--sh-texto); font-size: 18px; cursor: pointer; }
.sh-alternar:hover { background: #f1f3f5; }
.sh-trilha { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; white-space: nowrap; }
.sh-trilha-secao { color: var(--sh-fraco); }
.sh-trilha-sep { font-size: 10px; color: #b3bcc5; }
.sh-trilha b { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sh-trilha b i { color: var(--mud-palette-primary); font-size: 14px; }
.sh-busca {
    margin-left: auto; display: flex; align-items: center; gap: 10px; width: 300px; height: 38px; padding: 0 8px 0 14px;
    border: 1px solid var(--sh-linha); border-radius: 10px; background: #f6f7f9; color: var(--sh-fraco); cursor: pointer;
    font: 400 13.5px/1 var(--fonte-app); transition: border-color .15s, background .15s;
}
.sh-busca:hover { border-color: #c9d1d9; background: #fff; }
.sh-busca span { flex: 1; text-align: left; }
.sh kbd, .sh-paleta kbd, .sh-menu-usuario kbd {
    font: 600 11px/1 var(--fonte-app); color: #5f6b76; background: #fff; border: 1px solid #dde2e7; border-bottom-width: 2px;
    border-radius: 6px; padding: 3px 6px; white-space: nowrap;
}
.sh-topo-acoes { display: flex; align-items: center; gap: 6px; }
/* sessão de superadmin: lembrete sempre visível no topo */
.sh-superadmin { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
    background: #b42318; color: #fff !important; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    text-decoration: none; white-space: nowrap; }
.sh-superadmin:hover { background: #912018; }
@media (max-width: 600px) { .sh-superadmin span { display: none; } .sh-superadmin { width: 30px; padding: 0; justify-content: center; } }
.sh-icone-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: #45515c !important; font-size: 17px; text-decoration: none; }
.sh-icone-btn:hover { background: #f1f3f5; color: var(--sh-texto) !important; }
.sh-icone-btn em { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef6c00;
    color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.sh-usuario { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 4px; border: 0; border-radius: 12px; background: none; cursor: pointer;
    font-family: var(--fonte-app); color: var(--sh-texto); }
.sh-usuario:hover { background: #f1f3f5; }
.sh-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--mud-palette-primary), color-mix(in srgb, var(--mud-palette-primary) 60%, #7c4dff)); }
.sh-avatar.grande { width: 44px; height: 44px; font-size: 15px; }
.sh-usuario-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; max-width: 180px; }
.sh-usuario-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sh-usuario-txt small { font-size: 11.5px; color: var(--sh-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sh-usuario > i { font-size: 10px; color: var(--sh-fraco); }

/* menu do usuário */
.sh-usuario-wrap { position: relative; }
.sh-usuario.aberto { background: #f1f3f5; }
.sh-usuario.aberto > i { transform: rotate(180deg); }
.sh-usuario > i { transition: transform .15s; }
.sh-fecha-menu { position: fixed; inset: 0; z-index: 40; }
.sh-menu-usuario { position: absolute; right: 0; top: calc(100% + 8px); z-index: 41; width: 280px; background: #fff; border-radius: 14px;
    border: 1px solid var(--sh-linha); box-shadow: 0 16px 40px rgba(16,24,40,.14); padding: 6px; animation: sh-sobe .15s ease; }
.sh-menu-cab { display: flex; align-items: center; gap: 12px; padding: 12px 12px 10px; }
.sh-menu-cab div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sh-menu-cab b { font-size: 14px; }
.sh-menu-cab small { font-size: 12px; color: var(--sh-fraco); overflow: hidden; text-overflow: ellipsis; }
.sh-menu-empresa { margin-top: 3px; }
.sh-menu-sep { height: 1px; background: var(--sh-linha); margin: 4px 6px; }
.sh-menu-form { margin: 0; }
.sh-menu-op { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: none;
    font: 500 13.5px/1 var(--fonte-app); color: var(--sh-texto); cursor: pointer; text-align: left; }
.sh-menu-op i { width: 18px; text-align: center; color: var(--sh-fraco); }
.sh-menu-op kbd { margin-left: auto; }
.sh-menu-op:hover { background: #f3f5f7; }
.sh-menu-op.sair { color: #c62828; }
.sh-menu-op.sair i { color: #c62828; }

/* ---------- conteúdo ---------- */
.sh-conteudo { flex: 1; min-width: 0; }
.sh-conteudo-in { max-width: 1440px; margin: 0 auto; padding: 28px 32px 48px; }

/* ---------- busca rápida (Ctrl+K) ---------- */
.sh-paleta-fundo { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,32,.38); backdrop-filter: blur(2px);
    display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: sh-aparece .15s ease; }
.sh-paleta { width: 100%; max-width: 620px; background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 30px 80px rgba(15,23,32,.35); max-height: 70vh; animation: sh-sobe .18s ease; font-family: var(--fonte-app); }
.sh-paleta-campo { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 58px; border-bottom: 1px solid var(--sh-linha); color: var(--sh-fraco); }
.sh-paleta-campo i { font-size: 17px; }
.sh-paleta-campo input { flex: 1; border: 0; outline: none; font: 400 16px/1 var(--fonte-app); color: var(--sh-texto); background: none; }
.sh-paleta-lista { overflow-y: auto; padding: 8px; }
.sh-paleta-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none;
    cursor: pointer; text-align: left; font-family: var(--fonte-app); color: var(--sh-texto); }
.sh-paleta-item.sel { background: var(--sh-realce); }
.sh-paleta-icone { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: #f1f3f5; color: #45515c; font-size: 15px; }
.sh-paleta-item.sel .sh-paleta-icone { background: var(--mud-palette-primary); color: #fff; }
.sh-paleta-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.sh-paleta-txt b { font-size: 14px; font-weight: 600; }
.sh-paleta-txt small { font-size: 12.5px; color: var(--sh-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-paleta-secao { font-size: 11.5px; color: #8a96a1; white-space: nowrap; }
.sh-paleta-vazio { padding: 28px; text-align: center; color: var(--sh-fraco); font-size: 14px; }
.sh-paleta-rodape { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--sh-linha); background: #fafbfc; font-size: 12px; color: var(--sh-fraco); }
.sh-paleta-rodape kbd { margin-right: 3px; }
@keyframes sh-aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes sh-sobe { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.sh-fundo { display: none; }

/* ---------- tablet e celular: o menu vira gaveta ---------- */
@media (max-width: 1100px) {
    .sh-usuario-txt { display: none; }
    .sh-busca { width: 220px; }
}
@media (max-width: 960px) {
    .sh-lado { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sh-lado) !important; transform: translateX(-100%); transition: transform .22s ease;
        box-shadow: none; }
    .sh-menu-aberto .sh-lado { transform: none; box-shadow: 20px 0 50px rgba(15,23,32,.2); }
    .sh-menu-aberto .sh-fundo { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(15,23,32,.35); animation: sh-aparece .2s ease; }
    /* na gaveta o menu aparece sempre inteiro, mesmo se recolhido no computador */
    .sh-recolhido .sh-marca-txt, .sh-recolhido .sh-item span, .sh-recolhido .sh-vitrine span { display: flex; }
    .sh-recolhido .sh-item span { display: inline; }
    .sh-recolhido .sh-item { justify-content: flex-start; padding: 0 12px; }
    .sh-recolhido .sh-vitrine { justify-content: flex-start; padding: 12px; }
    .sh-recolhido .sh-secao { padding: 18px 10px 6px; text-align: left; }
    .sh-recolhido .sh-secao span { height: auto; background: none; margin: 0; font-size: inherit; }
    .sh-recolhido .sh-badge { position: static; }
    .sh-recolher { display: none; }
    .sh-alternar { display: flex; align-items: center; justify-content: center; margin-left: -8px; }
    .sh-topo { padding: 0 16px; gap: 10px; }
    .sh-trilha-secao, .sh-trilha-sep { display: none; }
    .sh-busca { width: 40px; padding: 0; justify-content: center; border-color: transparent; background: none; font-size: 16px; }
    .sh-busca span, .sh-busca kbd { display: none; }
    .sh-conteudo-in { padding: 20px 16px 40px; }
}

/* ============================================================
   Cabeçalho de página (CabecalhoPagina)
   ============================================================ */
.pg-cab { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.pg-cab-icone { width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--mud-palette-primary); background: #fff; border: 1px solid var(--sh-linha); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.pg-cab-txt { flex: 1; min-width: 220px; }
.pg-cab-txt h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; color: var(--sh-texto); }
.pg-cab-txt p { margin: 3px 0 0; font-size: 14px; color: var(--sh-fraco); line-height: 1.5; }
.pg-cab-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) {
    .pg-cab-icone { width: 40px; height: 40px; font-size: 17px; border-radius: 12px; }
    .pg-cab-txt h1 { font-size: 20px; }
    .pg-cab-acoes { width: 100%; }
}

/* tabelas e cartões sobre o fundo cinza: borda fina no lugar da sombra */
.sh-conteudo .mud-table.mud-elevation-0, .sh-conteudo .mud-data-grid.mud-elevation-0,
.sh-conteudo .mud-paper-outlined { border: 1px solid var(--sh-linha); border-radius: 14px; overflow: hidden; background: #fff; }

/* ============================================================
   Início (Home)
   ============================================================ */
.ini-ola { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.ini-ola small { font-size: 13px; color: var(--sh-fraco); font-weight: 500; }
.ini-ola h1 { margin: 4px 0 2px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--sh-texto); }
.ini-ola p { margin: 0; font-size: 14.5px; color: var(--sh-fraco); }
.ini-ola-acoes { display: flex; gap: 10px; flex-wrap: wrap; }

.ini-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-bottom: 20px; }
.ini-kpi { display: flex; align-items: flex-start; gap: 14px; padding: 18px; min-height: 108px; background: #fff; border: 1px solid var(--sh-linha);
    border-radius: 16px; color: var(--sh-texto) !important; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.ini-kpi:hover { border-color: color-mix(in srgb, var(--mud-palette-primary) 40%, #fff); box-shadow: var(--sombra-card-hover); transform: translateY(-1px); }
.ini-kpi-icone { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ini-kpi-icone.laranja { background: #fff3e0; color: #ef6c00; }
.ini-kpi-icone.verde { background: #e8f5e9; color: #2e7d32; }
.ini-kpi-icone.azul { background: #e3f2fd; color: #1565c0; }
.ini-kpi-icone.roxo { background: #f3e5f5; color: #7b1fa2; }
.ini-kpi-txt { display: flex; flex-direction: column; min-width: 0; }
.ini-kpi-txt small { font-size: 12.5px; font-weight: 600; color: var(--sh-fraco); }
.ini-kpi-txt b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; white-space: nowrap; }
.ini-kpi-txt em { font-style: normal; font-size: 12.5px; color: var(--sh-fraco); margin-top: 2px; }
.ini-kpi-txt em.ok { color: #2e7d32; }
.ini-kpi-txt em.alerta { color: #b26a00; }
.ini-kpi-txt em i { font-size: 11px; margin-right: 2px; }
.ini-esqueleto { background: linear-gradient(90deg, #eceff2 25%, #f6f7f9 50%, #eceff2 75%); background-size: 200% 100%; animation: ini-brilho 1.2s infinite linear; border-color: transparent; }
@keyframes ini-brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.ini-grade { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ini-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.ini-card { background: #fff; border: 1px solid var(--sh-linha); border-radius: 16px; padding: 18px 20px 20px; }
.ini-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ini-card h2 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 9px; color: var(--sh-texto); }
.ini-card h2 i { color: var(--mud-palette-primary); font-size: 14px; }
.ini-card header > span { font-size: 12.5px; color: var(--sh-fraco); }
.ini-card header > a { font-size: 13px; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.ini-card header > a i { font-size: 11px; }

.ini-grafico { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 18px; }
.ini-barra { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.ini-barra-col { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--mud-palette-primary) 22%, #fff); transition: background .15s; }
.ini-barra:hover .ini-barra-col { background: color-mix(in srgb, var(--mud-palette-primary) 55%, #fff); }
.ini-barra.hoje .ini-barra-col { background: var(--mud-palette-primary); }
.ini-barra-val { font-size: 11px; font-weight: 700; color: var(--sh-texto); min-height: 13px; }

/* ---- Plataforma (superadmin) ---- */
.pl-tag { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #eef2f7; color: #45515c; font-size: 11px; font-weight: 600; }
.pl-tag.sa { background: #fdecea; color: #b42318; }
.pl-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .pl-grade { grid-template-columns: 1fr; } }
.pl-convidar { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 600px) { .pl-convidar { grid-template-columns: 1fr; } }
.pl-token { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; }
@media (max-width: 760px) { .pl-token { grid-template-columns: 1fr; } }
.pl-convite { padding: 12px 14px; border-radius: 10px; background: #f3f8f3; border: 1px solid #cfe6d3; }
.pl-convite-cab { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; font-size: 13.5px; }
.pl-convite-cab i { color: #2e7d32; margin-top: 3px; }
.ini-barra small { font-size: 11px; color: #8a96a1; }
.ini-barra.hoje small { color: var(--mud-palette-primary); font-weight: 700; }

.ini-lista { display: flex; flex-direction: column; margin: 0 -8px; }
.ini-pedido, .ini-link { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; color: var(--sh-texto) !important; text-decoration: none; }
.ini-pedido:hover, .ini-link:hover { background: #f6f7f9; }
.ini-avatar { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: #eef1f4; color: #45515c; font-size: 12.5px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; }
.ini-pedido-txt, .ini-link-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ini-pedido-txt b, .ini-link-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-pedido-txt small, .ini-link-txt small { font-size: 12px; color: var(--sh-fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ini-link-txt small.perto { color: #c62828; }
.ini-pedido-valor { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.ini-situacao { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ini-situacao.s-novo { background: #fff3e0; color: #e65100; }
.ini-situacao.s-atendido { background: #e8f5e9; color: #2e7d32; }
.ini-situacao.s-cancelado { background: #f1f3f5; color: #6b7680; }
.ini-link-icone { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: #f3e5f5; color: #7b1fa2; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ini-link-btn { width: 32px; height: 32px; flex-shrink: 0; border: 0; border-radius: 8px; background: none; color: var(--sh-fraco) !important; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: 13.5px; text-decoration: none; }
.ini-link-btn:hover { background: #eef1f4; color: var(--mud-palette-primary) !important; }

.ini-vazio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 16px; color: var(--sh-fraco); font-size: 13px; }
.ini-vazio i { font-size: 26px; color: #b0bec5; margin-bottom: 6px; }
.ini-vazio b { color: var(--sh-texto); font-size: 14px; }
.ini-vazio span { max-width: 320px; line-height: 1.5; }

.ini-atalhos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ini-atalho { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--sh-linha); border-radius: 12px; text-decoration: none;
    color: var(--sh-texto) !important; transition: border-color .15s, background .15s; min-width: 0; }
.ini-atalho:hover { border-color: color-mix(in srgb, var(--mud-palette-primary) 45%, #fff); background: color-mix(in srgb, var(--mud-palette-primary) 4%, #fff); }
.ini-atalho span { width: 32px; height: 32px; border-radius: 9px; background: var(--sh-realce); color: var(--mud-palette-primary);
    display: flex; align-items: center; justify-content: center; font-size: 14px; margin-bottom: 6px; }
.ini-atalho b { font-size: 13.5px; font-weight: 600; }
.ini-atalho small { font-size: 12px; color: var(--sh-fraco); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1100px) {
    .ini-grade { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .ini-ola h1 { font-size: 23px; }
    .ini-ola-acoes { width: 100%; }
    .ini-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ini-kpi { flex-direction: column; gap: 10px; padding: 14px; min-height: 0; }
    .ini-kpi-txt b { font-size: 21px; }
    .ini-pedido-valor { display: none; }
    .ini-grafico { gap: 3px; height: 140px; }
}

.pg-selo { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pg-selo.laranja { background: #fff3e0; color: #e65100; }

/* Acesso negado (AccessDenied) */
.pg-negado { max-width: 520px; margin: 8vh auto 0; text-align: center; background: #fff; border: 1px solid var(--sh-linha); border-radius: 18px; padding: 40px 32px; }
.pg-negado-icone { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #c62828; background: #fdecea; }
.pg-negado h1 { margin: 0 0 8px; font-size: 21px; font-weight: 700; color: var(--sh-texto); }
.pg-negado p { margin: 0 0 24px; font-size: 14.5px; color: var(--sh-fraco); line-height: 1.6; }
.pg-negado-btn { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 20px; border-radius: 10px; background: var(--mud-palette-primary);
    color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; }
.pg-negado-btn:hover { filter: brightness(1.08); }
