:root {
    --nav-w: 230px;
    --nav-bg: #2d2d30;
}

html, body { height: 100%; }
body { background: #f4f6f8; }

.app-shell { display: flex; min-height: 100vh; }

.app-nav {
    width: var(--nav-w);
    background: var(--nav-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.app-brand { padding: 18px 16px 12px; font-size: 1.25rem; font-weight: 700; }
.app-nav .nav-item {
    display: block; padding: 11px 18px; color: #ddd; text-decoration: none; font-size: .95rem;
}
.app-nav .nav-item i { width: 22px; display: inline-block; }
.app-nav .nav-item:hover { background: #3e3e42; color: #fff; }
.app-nav .nav-item.active { background: #0d6efd; color: #fff; }
.nav-section { padding: 14px 18px 4px; font-size: .75rem; text-transform: uppercase; color: #999; letter-spacing: .05em; }
.nav-user { margin-top: auto; padding: 14px 18px; border-top: 1px solid #444; font-size: .9rem; }

.app-main { flex: 1; padding: 22px 26px; min-width: 0; }

@media (max-width: 900px) {
    .app-shell { flex-direction: column; }
    .app-nav { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
    .app-brand { width: 100%; }
    .nav-user { margin-top: 0; width: 100%; }
    .app-main { padding: 14px; }
}

.stat-card { background: #fff; border: 1px solid #e3e6ea; border-left-width: 5px; border-radius: 8px; padding: 14px 16px; }
.stat-label { color: #6c757d; font-size: .85rem; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }

.product-thumb { width: 56px; height: 56px; object-fit: contain; border: 1px solid #eee; border-radius: 4px; background: #fff; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #2d2d30, #0d6efd); }
.login-card { background: #fff; padding: 36px 32px; border-radius: 12px; width: 380px; max-width: 92vw; box-shadow: 0 10px 40px rgba(0,0,0,.3); }

.items-table input.form-control-sm { min-width: 70px; }
.items-table td { vertical-align: middle; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #dee2e6; padding: 10px 0; z-index: 5; }

.public-page { max-width: 960px; margin: 0 auto; padding: 24px 16px; font-family: Arial, sans-serif; }
.public-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #0d6efd; padding-bottom: 12px; }
.public-frame { width: 100%; height: 80vh; border: 1px solid #ddd; border-radius: 6px; }
@media (max-width: 767px) { .public-frame { display: none; } }

#blazor-error-ui { z-index: 2000; }
