/* ============================================================
   app.css — SÓ o que é específico do Blazor e não existe no
   CSS do Vue (boot UI, helpers de markup exclusivo do porte).
   Todo o resto vem de lib/element-plus/index.css + css/style.css (copiado do Vue) + css/views.css (estilos das vistas Vue).
   ============================================================ */

/* --- Blazor WebAssembly boot / error UI --- */
#blazor-error-ui {
    background: #fff8c5;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* --- Shell estática mostrada em #app antes do WASM arrancar (ver index.html) ---
   O Blazor substitui todo o conteúdo de #app assim que monta <App>, por isso isto
   desaparece sozinho sem precisar de nenhum código a removê-lo. */
.boot-shell .sidebar-link {
    cursor: default;
}

.boot-shell__skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    max-width: 40rem;
}

.boot-shell__bar {
    height: 0.9rem;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #eceef2 25%, #f5f6f8 37%, #eceef2 63%);
    background-size: 400% 100%;
    animation: boot-shell-pulse 1.4s ease-in-out infinite;
}

.boot-shell__bar--title {
    height: 1.375rem;
    width: 40%;
}

.boot-shell__bar--short {
    width: 60%;
}

@keyframes boot-shell-pulse {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.sidebar-nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
}

/* --- Badge "DRAFT" usado nos formulários (não existe no Vue) --- */
.badge--muted {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

/* --- Helpers de markup exclusivo do ProductForm Blazor --- */
.chip-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.8125rem;
}

.product-dims {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.product-dims .field-control {
    width: 6.5rem;
    min-width: 0;
}

/* --- Helpers do Dashboard Blazor (estrutura interna própria) --- */
.dashboard-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.dashboard-metric {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
}
.dashboard-metric span { color: var(--color-text-muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.dashboard-metric strong { color: var(--color-text); font-size: 1.25rem; font-weight: 800; }
.dashboard-metric--link { color: inherit; text-decoration: none; }
.dashboard-metric--link:hover { border-color: var(--color-primary-border); background: var(--color-primary-soft); }
.dashboard-table-wrap { overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.dashboard-table { width: 100%; border-collapse: collapse; background: #fff; }
.dashboard-table th,
.dashboard-table td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--color-border); font-size: 0.8125rem; text-align: left; }
.dashboard-table th { background: #f8fafc; color: var(--color-primary); font-weight: 800; }
.dashboard-table__row { cursor: pointer; }
.dashboard-table__row:hover { background: var(--color-primary-soft); }
.dashboard-table__code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.75rem; }

/* --- Helpers de markup interno do EntitiesPage / StoresPage Blazor --- */
.entity-tabs { display: flex; flex-wrap: wrap; margin-bottom: 1rem; border-bottom: 1px solid var(--color-border-strong, #dcdfe6); }
.entity-tabs__item {
    padding: 0.625rem 1rem;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
}
.entity-tabs__item--active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }
.entity-info-title { margin: 0 0 1rem; font-size: 1rem; font-weight: 700; }
.entity-form-row { display: grid; gap: 1rem; }
.entity-form-row--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entity-form-row--third { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entity-tab-actions { margin-top: 1rem; }
.entity-subsection { margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.entity-subsection__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.checkbox-grid { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-checkbox { display: inline-flex; align-items: center; gap: 0.4rem; }
.store-products-page { padding: 0.5rem 0 1rem; }
.store-products-page__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.store-products-page__header h2 { margin: 0; font-size: 1rem; }

/* --- Legacy (ainda referenciado por 1-2 páginas Blazor) --- */
.form-control {
    width: 100%;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    color: var(--color-text);
    background: var(--color-surface);
    font-size: 0.8125rem;
}
.search { max-width: 24rem; margin-bottom: 1rem; }

@media (max-width: 960px) {
    .dashboard-metrics,
    .entity-form-row--half,
    .entity-form-row--third { grid-template-columns: 1fr; }
}

/* --- Marca DeTrigo na sidebar: o PNG tem de caber na caixa do ícone (o MoG usava um SVG inline) --- */
.brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
