/* PIM Sanitari e arredo bagno — stili dell'applicazione */

html, body { margin: 0; font-family: "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; background: #F5F6F8; color: #1D2330; }
h1:focus { outline: none; }

/* Barra superiore */
.app-title { white-space: nowrap; font-weight: 600; letter-spacing: .2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.appbar-select-locale, .appbar-select { flex-shrink: 0; }
.appbar-search { width: min(420px, 38vw); margin: 0 12px; }
.appbar-search .mud-input-outlined { background: rgba(255,255,255,.95); border-radius: 6px; }
.appbar-select { width: 96px; margin: 0 6px; background: rgba(255,255,255,.95); border-radius: 6px; }
.appbar-select-wide { width: 190px; }
.appbar-select-locale { width: 170px; }
.appbar-select .mud-input-outlined-border { border-color: transparent !important; }
.logout-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 16px; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.logout-button:hover { background: rgba(0,0,0,.04); }

/* Intestazione pagina */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 1.45rem; font-weight: 600; margin: 0; }
.page-header .subtitle { color: #5D6675; font-size: .9rem; margin-top: 2px; }

/* Miniature e media */
.thumb { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid #E2E6EC; border-radius: 4px; display: block; }
.thumb-placeholder { width: 44px; height: 44px; border: 1px dashed #C8CED8; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #9AA3B2; }
.asset-card { position: relative; border: 1px solid #E2E6EC; border-radius: 6px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow .15s; }
.asset-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.asset-card img { width: 100%; height: 140px; object-fit: contain; background: #fafbfc; display: block; }
.asset-card .asset-icon { height: 140px; display: flex; align-items: center; justify-content: center; background: #fafbfc; }
.asset-card .asset-meta { padding: 6px 8px; font-size: .8rem; line-height: 1.3; }
.asset-card .asset-meta .code { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.asset-strip .asset-item { width: 120px; position: relative; }
.asset-strip .asset-item img { width: 120px; height: 90px; object-fit: contain; border: 1px solid #E2E6EC; border-radius: 4px; background: #fff; }
.asset-strip .asset-item .remove { position: absolute; top: 2px; right: 2px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); vertical-align: middle; margin-right: 6px; }

/* Editor prodotto */
.value-row { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid #EEF1F5; }
.value-row:last-child { border-bottom: 0; }
/* Linguette dei canali nella scheda prodotto: nome, percentuale e badge dei mancanti in linea (il badge di MudTabPanel veniva tagliato). */
.channel-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.channel-tab-percent { font-weight: 700; font-size: .78rem; }
.channel-tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--mud-palette-warning); color: var(--mud-palette-warning-text); font-size: .72rem; font-weight: 700; line-height: 1; }
.value-label { padding-top: 10px; font-weight: 500; }
.value-label .meta { display: block; font-weight: 400; color: #7A8394; font-size: .75rem; margin-top: 2px; }
.value-label .required { color: #B91C1C; margin-left: 2px; }
.inherited-note { color: #7A8394; font-size: .75rem; margin-top: 4px; }
.completeness-chip { min-width: 56px; }
.diff-old { background: #FDECEC; text-decoration: line-through; padding: 1px 4px; border-radius: 3px; }
.diff-new { background: #E7F6EC; padding: 1px 4px; border-radius: 3px; }
.mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .8rem; }
.log-box { white-space: pre-wrap; font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .78rem; background: #0F172A; color: #E2E8F0; padding: 12px; border-radius: 6px; max-height: 480px; overflow: auto; }
.kpi .mud-typography-h4 { font-weight: 600; }
.clickable { cursor: pointer; }
.nowrap { white-space: nowrap; }
.dup-codes { max-height: 340px; overflow: auto; }
.dup-codes thead th { position: sticky; top: 0; z-index: 1; background: var(--mud-palette-surface); }

@media (max-width: 900px) {
  .value-row { grid-template-columns: 1fr; }
  .appbar-search { display: none; }
  .appbar-select-wide { width: 140px; }
}

@media (max-width: 600px) {
  .appbar-select-locale { width: 158px; }
}

/* Pagine di accesso (render statico) */
.account-shell { min-height: 100vh; background: linear-gradient(135deg, #13315C 0%, #1F5FA8 55%, #0F766E 100%); }
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 28px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.auth-logo { background: #13315C; color: #fff; font-weight: 700; border-radius: 8px; padding: 10px 12px; letter-spacing: 1px; }
.auth-title { font-weight: 600; font-size: 1.05rem; }
.auth-subtitle { color: #5D6675; font-size: .85rem; }
.auth-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.auth-field label { font-weight: 500; font-size: .9rem; }
.auth-check { display: flex; gap: 8px; align-items: center; margin: 6px 0 16px; font-size: .9rem; }
.auth-divider { text-align: center; color: #7A8394; margin: 14px 0 6px; font-size: .85rem; }
.auth-links { text-align: center; margin: 12px 0 0; font-size: .9rem; }
.form-control { box-sizing: border-box; width: 100%; padding: 10px 12px; border: 1px solid #C8CED8; border-radius: 6px; font: inherit; }
.form-control:focus { outline: 2px solid #1F5FA8; outline-offset: -1px; border-color: #1F5FA8; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 6px; border: 1px solid transparent; font: inherit; cursor: pointer; text-align: center; text-decoration: none; }
.btn-primary { background: #1F5FA8; color: #fff; }
.btn-primary:hover { background: #184C87; }
.btn-link { background: none; color: #1F5FA8; }
.btn-danger { background: #B91C1C; color: #fff; }
.w-100 { width: 100%; }
.text-danger { color: #B91C1C; font-size: .85rem; }
.alert { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; background: #FDECEC; color: #7F1D1D; }
.alert-success { background: #E7F6EC; color: #14532D; }
.manage-page { max-width: 960px; margin: 0 auto; padding: 32px 16px; color: #fff; }
.manage-page h1 { font-weight: 600; }
.manage-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.manage-grid section { background: #fff; color: #1D2330; border-radius: 10px; padding: 24px; }
.manage-nav { list-style: none; padding: 0; margin: 0; }
.manage-nav .nav-link { display: block; color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 6px; }
.manage-nav .nav-link.active, .manage-nav .nav-link:hover { background: rgba(255,255,255,.15); }
.form-floating { margin-bottom: 12px; display: flex; flex-direction: column-reverse; gap: 4px; }
.mb-3 { margin-bottom: 12px; }

#blazor-error-ui { background: #FDECEC; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
