/* Magazzino Filati prototype - pastel theme, larger type */

/* Larger type across the page (user request) */
.app-shell {
    font-size: 16.5px;
}

.app-shell p,
.app-shell li,
.app-shell dd,
.app-shell dt {
    font-size: 16.5px;
    line-height: 1.5;
}

.app-shell h2,
.app-shell [class*="group-label"] {
    letter-spacing: -0.01em;
}

/* Home: four pastel action cards */
.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
}

.app-big {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-height: 118px;
    padding: 18px;
    border: none;
    border-radius: 22px;
    color: var(--ds-ink, #251f21);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(37, 31, 33, 0.07);
}

.app-big:active {
    filter: brightness(0.96);
}

.app-big.is-carico { background: #fde8d8; }
.app-big.is-scarico { background: #fbe3e8; }
.app-big.is-stock { background: #dff2ea; }
.app-big.is-revenue { background: #e9e4f7; }

.app-big-icon {
    font-size: 32px;
    line-height: 1.1;
}

.app-big-label {
    font-size: 20px;
    font-weight: 600;
}

.app-big-sub {
    font-size: 14px;
    color: var(--ds-ink-2, #585254);
}

.app-list {
    margin: 10px 0 0;
    padding-left: 22px;
}

.app-list li {
    margin: 8px 0;
}

/* Scan screen */
.app-viewfinder {
    position: relative;
    height: 160px;
    margin: 14px 0;
    border-radius: 22px;
    background: var(--ds-ink, #251f21);
    border: 6px solid #e9e4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.app-barcode {
    color: #fff;
    font-size: 38px;
    letter-spacing: 2px;
    opacity: 0.85;
}

.app-scanline {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 3px;
    border-radius: 2px;
    background: #f5b8c4;
    animation: app-scan 1.6s ease-in-out infinite alternate;
}

@keyframes app-scan {
    from { top: 22%; }
    to { top: 78%; }
}

.app-scan-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 10px 0 18px;
}

.app-scan-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
    border: none;
    border-radius: 20px;
    background: #fbf3d0;
    color: var(--ds-ink, #251f21);
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 31, 33, 0.07);
}

.app-scan-item:nth-child(2n) { background: #e2eef9; }

.app-scan-item img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
}

/* Product screen */
.app-product {
    display: flex;
    gap: 16px;
    align-items: center;
    margin: 10px 0 16px;
    padding: 14px;
    border-radius: 20px;
    background: #dff2ea;
}

.app-product-photo {
    width: 104px;
    height: 104px;
    border-radius: 16px;
    object-fit: cover;
    flex: none;
}

.app-product-name {
    font-size: 22px;
    font-weight: 600;
}

.app-product-sub {
    color: var(--ds-ink-2, #585254);
    font-size: 15px;
    margin-top: 3px;
}

.app-product-ean {
    color: var(--ds-ink-2, #585254);
    font-size: 13.5px;
    margin-top: 3px;
}

.app-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 18px 0 6px;
}

.app-step {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: #e9e4f7;
    color: var(--ds-ink, #251f21);
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(37, 31, 33, 0.08);
}

.app-qty {
    font-size: 24px;
    font-weight: 600;
    min-width: 76px;
    text-align: center;
}

/* Stock list */
.app-stock-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
}

.app-stock-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 20px;
    background: #f4efec;
    color: var(--ds-ink, #251f21);
    font: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 2px 8px rgba(37, 31, 33, 0.06);
}

.app-stock-item:nth-child(4n+1) { background: #dff2ea; }
.app-stock-item:nth-child(4n+2) { background: #fbe3e8; }
.app-stock-item:nth-child(4n+3) { background: #e9e4f7; }
.app-stock-item:nth-child(4n+4) { background: #fde8d8; }

.app-stock-item.is-static {
    cursor: default;
}

.app-photo-placeholder {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    background: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.app-stock-item img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 14px;
    object-fit: cover;
}

.app-stock-name {
    flex: 1;
    font-size: 16.5px;
    font-weight: 600;
}

.app-stock-name small {
    font-weight: 400;
    font-size: 14px;
    color: var(--ds-ink-2, #585254);
}

.app-stock-qty {
    font-weight: 600;
    font-size: 17px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.75);
    padding: 6px 12px;
    border-radius: 999px;
    align-self: flex-start;
}

.app-stock-qty.is-low {
    background: #fff;
    color: var(--ds-red, #ed313e);
    box-shadow: inset 0 0 0 2px #f5b8c4;
}

.app-backbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 6px 0 10px;
    background: linear-gradient(to bottom, var(--ds-bg, #faf6f4) 80%, transparent);
}

.app-back {
    font-size: 16.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #efe6e2;
    color: var(--ds-ink, #3a3436);
    cursor: pointer;
}

.app-az {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 14px;
}

.app-az-item {
    min-width: 34px;
    padding: 8px 6px;
    border-radius: 10px;
    border: none;
    background: #f1e9e5;
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-ink, #3a3436);
    cursor: pointer;
    text-align: center;
}

.app-az-item.is-active {
    background: var(--ds-accent, #7c5cbf);
    color: #fff;
}

.app-lowstock {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 18px;
    padding: 16px 18px;
    margin: 14px 0;
    background: #fdeaea;
    box-shadow: inset 0 0 0 2px #f5c6cb;
    cursor: pointer;
}

.app-lowstock-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ds-red, #c9202c);
    margin-bottom: 6px;
}

.app-lowstock-sub {
    display: block;
    font-size: 14.5px;
    color: var(--ds-ink-2, #585254);
    margin-bottom: 8px;
}

.app-lowstock-cta {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-accent, #7c5cbf);
}

.app-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0 16px;
}

.app-stat {
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-stat-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--ds-ink-2, #585254);
}

.app-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.app-stat.is-carico { background: #fde8d7; }
.app-stat.is-scarico { background: #fbe3ea; }
.app-stat.is-stock { background: #dff2e4; }
.app-stat.is-revenue { background: #e9e4f8; }

.app-stat.is-total {
    background: #3a3436;
    color: #fff;
}

.app-stat.is-total .app-stat-label {
    color: rgba(255, 255, 255, 0.75);
}

/* ---- Pagina autonoma ---- */
* { box-sizing: border-box; }
body { margin: 0; background: #f4efec; color: #251f21; font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 16.5px; line-height: 1.5; }
.app-shell { max-width: 760px; margin: 0 auto; padding: 16px 16px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.topbar h1 { font-size: 22px; margin: 0; }
.status { font-size: 14px; color: #585254; margin: 0 0 12px; }
.btn { font: inherit; border: none; border-radius: 16px; padding: 13px 20px; cursor: pointer; background: #7c5cbf; color: #fff; font-weight: 600; }
.btn.ghost { background: #fff; color: #251f21; box-shadow: inset 0 0 0 1.5px #d9d0d3; }
.btn:disabled { opacity: 0.45; cursor: default; }
.group { background: #fff; border-radius: 22px; padding: 18px; margin: 14px 0; box-shadow: 0 2px 10px rgba(37,31,33,.06); }
.group h2 { margin: 0 0 8px; font-size: 20px; }
.callout { border-radius: 16px; padding: 12px 14px; margin: 12px 0; background: #eef3fb; }
.callout b { display: block; margin-bottom: 2px; }
.callout.warning { background: #fff4d6; } .callout.danger { background: #fde1e1; } .callout.ok { background: #dff2ea; }
.facts { margin: 10px 0; display: grid; gap: 8px; }
.facts div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid #eee7e9; padding: 6px 0; }
.facts span:first-child { color: #585254; } .facts span:last-child { text-align: right; font-weight: 600; }
input[type=text], input[type=password], input[type=search], input[type=number], input:not([type]) { width: 100%; font: inherit; padding: 13px 14px; border: 1.5px solid #d9d0d3; border-radius: 14px; background: #fff; margin: 6px 0 10px; }
label { font-weight: 600; font-size: 15px; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 14px; }
.choice button { font: inherit; padding: 11px 16px; border-radius: 14px; border: 1.5px solid #d9d0d3; background: #fff; cursor: pointer; }
.choice button.on { background: #e9e4f7; border-color: #7c5cbf; font-weight: 600; }
.app-stock-item { width: 100%; text-align: left; font: inherit; }
.app-stock-item img, .app-scan-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.app-lowstock { width: 100%; font: inherit; }
.var-list { display: grid; gap: 8px; margin: 10px 0; }
.var-list button { font: inherit; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid #d9d0d3; background: #fff; display: flex; justify-content: space-between; cursor: pointer; }
.var-list button.on { background: #e9e4f7; border-color: #7c5cbf; }
.login { max-width: 420px; margin: 12vh auto 0; }
.small { font-size: 14px; color: #585254; }
