/* daCLOUD — tema "Verde vivo": colori, misure e superfici del pannello
   I fogli di questa cartella si caricano in ordine (numero iniziale): l'ordine conta, i successivi
   rifiniscono i precedenti. */

/* =====================================================================
   1.99.0 — redesign "Verde vivo"
   Più compatto (campi 36 px, testi un punto più piccoli, margini 12–14 px),
   più verde P.Stop (barra laterale verde scuro, sfondo menta, accento
   in gradiente), forme morbide e piccole animazioni.
   Solo aspetto: classi, id e markup sono quelli di prima, quindi tutte le
   funzioni restano identiche. I colori derivano da --green-*: il colore
   del marchio (white-label) continua a sostituire l'intera palette.
   ===================================================================== */
:root {  --text-sm: 11.5px; --text-base: 12.5px; --text-md: 13.5px;
    --text-lg: 14.5px;  --text-xl: 15.5px; --text-2xl: 17px;    --text-3xl: 19px;
    --text-4xl: 22px;   --text-5xl: 26px;  --text-6xl: 30px;
    --control-h: 36px;
    --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px;
    --sidebar-w: 236px;
    --sidebar-rail-w: 68px;
    --topbar-h: 56px;
    --bg: var(--green-50);
    --surface-2: #f7fbf8;
    --line: #dde8e1;
    --line-soft: #ebf2ed;
    --shadow-sm: 0 1px 2px rgba(6, 48, 31, .05), 0 3px 10px -6px rgba(6, 48, 31, .10);
    --shadow-md: 0 2px 4px rgba(6, 48, 31, .04), 0 14px 30px -18px rgba(6, 48, 31, .32);
    --shadow-lg: 0 30px 70px -30px rgba(6, 48, 31, .48);
    --ease-out: cubic-bezier(.22, .61, .36, 1);
    --font-head: var(--font-num);
    --mark-ring: var(--bg);
}

body {
    background:
        radial-gradient(900px 420px at 100% -8%, var(--green-100), transparent 62%),
        radial-gradient(700px 360px at -10% 105%, var(--green-100), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    line-height: 1.45;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.025em; }
h4 { font-weight: 700; }
::selection { background: var(--green-200); color: var(--green-900); }
:focus-visible { box-shadow: 0 0 0 3px var(--green-200), 0 0 0 4px var(--green-500); }

/* --------------------------------------------------------- marchio */
.brand { font-size: var(--text-2xl); gap: 9px; }
.brand-mark {
    position: relative;
    width: 30px; height: 30px;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--green-500), var(--green-700));
    font-size: var(--text-lg);
}
.brand-mark::after {
    content: '';
    position: absolute;
    top: -3px; right: -3px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--green-300);
    box-shadow: 0 0 0 2px var(--mark-ring);
}

/* --------------------------------------------------------- barra laterale */
.sidebar {
    --mark-ring: var(--green-900);
    background: linear-gradient(180deg, var(--green-900) 0%, var(--green-800) 100%);
    border-right: 0;
    color: #fff;
    padding: 16px 12px 12px;
    gap: 12px;
    overflow: hidden;
}
.sidebar::after {
    content: '';
    position: absolute;
    left: -90px; bottom: -110px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: var(--green-500);
    opacity: .16;
    filter: blur(40px);
    pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }
.sidebar .brand { color: #fff; }
.sidebar .brand-mark { background: #fff; color: var(--green-700); }
.sidebar .brand-logo { background: #fff; border-radius: 8px; padding: 3px; }
.sidebar .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.sidebar-nav { gap: 1px; scrollbar-color: rgba(255, 255, 255, .22) transparent; }
.sidebar-nav a {
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .80);
    font-size: var(--text-md);
    transition: background .15s ease, color .15s ease, transform .15s var(--ease-out);
}
.sidebar-nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; transform: translateX(2px); }
.sidebar-nav a.active {
    background: #fff;
    color: var(--green-800);
    box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55);
    transform: none;
}
.nav-icon, .nav-icon svg { width: 17px; height: 17px; }
.nav-icon { opacity: .9; }
.nav-icon svg { stroke-width: 2; }
.nav-section {
    padding: 14px 10px 4px;
    letter-spacing: .08em;
    color: var(--green-300);
}
.nav-badge { background: var(--sun-soft); color: var(--sun-ink); font-size: var(--text-xs); padding: 1px 6px; } /* 1.99.3: colore e misura dalla palette */
.sidebar-nav a.active .nav-badge { background: var(--green-100); color: var(--green-800); }

/* sezioni richiudibili, "Vai a…" e menu a icone (assets/js/shell.js) */
button.nav-section {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; border: 0; background: none; cursor: pointer; text-align: left;
    font-family: inherit; font-weight: 650; text-transform: uppercase; border-radius: 8px;
}
button.nav-section:hover { color: #fff; }
button.nav-section::after {
    content: '';
    width: 7px; height: 7px;
    border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .18s var(--ease-out);
    opacity: .8;
}
button.nav-section[aria-expanded="false"]::after { transform: rotate(-45deg); }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group.is-closed { display: none; }
.sidebar-nav.is-searching .nav-group { display: flex; }
.sidebar-nav .is-filtered { display: none !important; }
.nav-filter { position: relative; margin: -2px 2px 0; }
.nav-filter input {
    width: 100%; height: 34px; padding: 0 12px 0 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .08) no-repeat 11px center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.65' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    color: #fff;
    font-size: var(--text-base);
}
.nav-filter input::placeholder { color: rgba(255, 255, 255, .66); }
.nav-filter input:hover { border-color: rgba(255, 255, 255, .28); }
.nav-filter input:focus { border-color: var(--green-300); background-color: rgba(255, 255, 255, .12); box-shadow: 0 0 0 3px rgba(121, 199, 156, .25); }
.nav-filter input::-webkit-search-cancel-button { filter: invert(1); opacity: .7; }
.nav-filter-empty { padding: 10px; font-size: var(--text-base); color: rgba(255, 255, 255, .7); }
.nav-rail-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%; min-height: 36px; padding: 0 10px;
    border: 0; border-radius: 10px;
    background: transparent; color: rgba(255, 255, 255, .72);
    font-size: var(--text-base); cursor: pointer;
}
.nav-rail-toggle:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-rail-toggle svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease-out); }
@media (min-width: 901px) {
    .app-shell { transition: grid-template-columns .22s var(--ease-out); }
    .app-shell.nav-rail { grid-template-columns: var(--sidebar-rail-w) minmax(0, 1fr); }
    .nav-rail .sidebar { padding-inline: 10px; }
    .nav-rail .sidebar-brand { justify-content: center; padding: 2px 0 0; }
    .nav-rail .brand > span:not(.brand-mark), .nav-rail .brand-logo-name { display: none; }
    .nav-rail .nav-filter, .nav-rail .nav-section { display: none; }
    .nav-rail .nav-group, .nav-rail .nav-group.is-closed { display: flex; }
    .nav-rail .nav-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
    .nav-rail .sidebar-nav a { justify-content: center; padding: 9px 0; position: relative; }
    .nav-rail .sidebar-nav a:hover { transform: none; }
    .nav-rail .sidebar-nav a > span:not(.nav-icon) { display: none; }
    .nav-rail .sidebar-nav a > span.nav-badge { display: block; position: absolute; top: 6px; right: 12px; width: 7px; height: 7px; padding: 0; font-size: 0; border-radius: 50%; }
    .nav-rail .nav-rail-toggle { justify-content: center; padding: 0; }
    .nav-rail .nav-rail-toggle span { display: none; }
    .nav-rail .nav-rail-toggle svg { transform: rotate(180deg); }
}
@media (max-width: 900px) {
    .sidebar { width: 264px; }
    .nav-rail-toggle { display: none; }
}

/* --------------------------------------------------------- barra superiore */
.topbar {
    height: var(--topbar-h);
    padding: 0 20px;
    gap: 12px;
    background: rgba(241, 248, 244, .84);
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border-bottom: 1px solid var(--line-soft);
}
.topbar-title span { font-size: 10px; letter-spacing: .08em; }
.topbar-title strong { font-family: var(--font-head); font-size: var(--text-xl); }
.icon-btn {
    width: 34px; height: 34px;
    border-radius: 999px;
    border-color: transparent;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: background .15s ease, color .15s ease, transform .15s var(--ease-out);
}
.icon-btn:hover { background: var(--green-50); border-color: transparent; color: var(--green-700); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 17px; height: 17px; stroke-width: 2; }
.notification-count { top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 5px; font-size: 10px; border-color: var(--bg); animation: count-pop .4s var(--ease-out); }
@keyframes count-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: none; } }
.user-menu-button {
    padding: 3px 12px 3px 3px;
    border-color: transparent;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s ease;
}
.user-menu-button:hover { border-color: transparent; box-shadow: var(--shadow-md); }
.user-avatar { width: 30px; height: 30px; font-size: var(--text-xs); background: linear-gradient(145deg, var(--green-500), var(--green-700)); }
.user-menu-copy strong { font-size: var(--text-base); }
.user-popover, .notification-panel { border-color: var(--line-soft); border-radius: 16px; box-shadow: var(--shadow-lg); animation: pop-in .16s var(--ease-out); }
.user-popover a, .user-popover button, .user-popover .logout-inline button { border-radius: 9px; padding: 7px 10px; font-size: var(--text-base); }
.user-popover a:hover, .user-popover button:hover, .user-popover .logout-inline button:hover { background: var(--green-50); color: var(--green-800); }
.user-popover-avatar { background: linear-gradient(145deg, var(--green-500), var(--green-700)); width: 34px; height: 34px; }
.notification-panel-head { padding: 10px 14px; }
.notification-item { padding: 10px 14px; }
.notification-item.unread { background: var(--green-50); }
.notification-dot { box-shadow: 0 0 0 3px var(--green-100); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.main-content { padding: 18px 20px 48px; max-width: none; } /* 1.99.4: il contenuto riempie sempre lo spazio a destra del menu (con un tetto di 1640 px, riducendo il menu tutto scivolava a sinistra lasciando un vuoto) */

/* --------------------------------------------------------- pagina */
.page-head { margin-bottom: 14px; gap: 12px 16px; }
.page-head h1 { font-size: var(--text-5xl); line-height: 1.1; }
.page-head p { font-size: var(--text-base); margin-top: 3px; }
.page-actions { gap: var(--gap-actions); }
.spinner { border-color: var(--green-100); border-top-color: var(--green-500); }

/* --------------------------------------------------------- schede */
.card { border-color: var(--line-soft); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-head { padding: 11px 14px; gap: 8px 10px; border-bottom-color: var(--line-soft); }
.card-head h2 { font-size: var(--text-lg); }
.card-head .muted { font-size: var(--text-sm); }
.card-body { padding: 14px; }
.card-body > * + * { margin-top: 14px; }
.stack { gap: 14px; }
.main-content > .card { margin-bottom: 14px; }
.dashboard-widgets > .card:hover, .store-card:hover { box-shadow: var(--shadow-md); }

/* --------------------------------------------------------- indicatori */
.metrics-grid { margin-bottom: 12px; }
.metric-card { position: relative; padding: 12px 14px 13px; gap: 2px; overflow: hidden; isolation: isolate; }
.metric-card::after {
    content: '';
    position: absolute;
    z-index: -1;
    top: -42px; right: -36px;
    width: 104px; height: 104px;
    border-radius: 50%;
    background: var(--green-50);
    transition: transform .45s var(--ease-out);
    pointer-events: none;
}
.metric-card:hover::after { transform: scale(1.3); }
.metric-card > span { font-size: var(--text-sm); font-weight: 600; }
.metric-card > strong { font-size: var(--text-4xl); font-weight: 700; line-height: 1.2; }
.metric-card > small { font-size: var(--text-sm); }
.metric-card.accent {
    border-color: transparent;
    box-shadow: 0 16px 30px -20px var(--green-700);
}
.metric-card.accent::after { background: rgba(255, 255, 255, .13); width: 150px; height: 150px; top: -60px; right: -50px; }
.kpi-inline { gap: 18px; }
.kpi-inline strong { font-size: var(--text-lg); }

/* --------------------------------------------------------- comandi */
.btn {
    height: 34px;
    padding: 0 14px;
    gap: 6px;
    border-radius: 999px;
    font-size: var(--text-md);
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s var(--ease-out);
}
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary {
    background: linear-gradient(180deg, var(--green-500) 0%, var(--green-600) 100%);
    box-shadow: 0 8px 16px -10px var(--green-700), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--green-600) 0%, var(--green-700) 100%); }
.btn-secondary { background: var(--surface); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--green-300); background: var(--green-50); color: var(--green-700); }
.btn-ghost:hover:not(:disabled) { background: var(--green-50); }
.btn-sm { height: 28px; padding: 0 11px; font-size: var(--text-base); border-radius: 999px; }
.btn-icon { width: 28px; padding: 0; }
.btn:not(.btn-sm).btn-icon { width: 34px; }
.btn-lg { height: 42px; padding: 0 18px; font-size: var(--text-lg); border-radius: 999px; }
.btn:active:not(:disabled) { transform: scale(.97); }

.tabs {
    padding: 3px;
    gap: 2px;
    border-radius: 999px;
    background: var(--surface);
    border-color: var(--line-soft);
    box-shadow: var(--shadow-sm);
}
.tab {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--ink-2);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.tab:hover { color: var(--green-700); background: var(--green-50); }
.tab.active { background: linear-gradient(180deg, var(--green-500), var(--green-600)); color: #fff; box-shadow: 0 6px 12px -8px var(--green-700); }

/* --------------------------------------------------------- etichette e avvisi */
.status-pill { padding: 2px 8px; font-weight: 700; gap: 5px; }

.doc-badge, .audit-badge, .group-badge, .import-status { padding: 1px 8px; font-size: var(--text-xs); }
.alert { padding: 10px 14px; border-radius: 14px; margin-bottom: 14px; gap: 10px; font-size: var(--text-base); }
/* 4.4.6: testi lunghi senza spazi (es. intestazione CSV) vanno a capo invece di uscire dalla finestra */
.alert > span:first-child { min-width: 0; }
.alert code { overflow-wrap: anywhere; }
.backup-reminder { box-shadow: var(--shadow-sm); }

/* --------------------------------------------------------- tabelle */
table { font-size: var(--text-base); }
thead th { padding: 9px 12px; border-bottom-color: var(--line-soft); }
tbody td { padding: 8px 12px; }

.table-empty { padding: 26px 14px; }
.pager { padding: 10px 14px; }
.summary-strip { border-radius: 14px; border-color: var(--line-soft); background: var(--line-soft); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.summary-item { padding: 10px 14px; }
.summary-item strong { font-size: var(--text-2xl); }

/* --------------------------------------------------------- filtri e campi */
.filter-bar { padding: 10px 12px; gap: 10px; border-radius: 16px; border-color: var(--line-soft); margin-bottom: 14px; }
.filter-grid { padding: 12px 14px; gap: 10px; }
.search-box input { height: var(--control-h); border-radius: 999px; padding-left: 32px; }
input, select, textarea { height: var(--control-h); padding: 0 11px; border-radius: 10px; border-color: var(--line); font-size: var(--text-md); }
textarea { height: auto; padding: 9px 11px; min-height: 72px; }
input:hover, select:hover, textarea:hover { border-color: var(--green-200); }
input:focus, select:focus, textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
select { background-position: right 10px center; padding-right: 30px; }
.field { gap: 5px; }
.field > span { font-size: var(--text-base); font-weight: 600; }
.form-grid { gap: 14px; }
.checkbox-field { padding: 9px 12px; border-radius: 12px; }
.checkbox-field:has(input:checked) { border-color: var(--green-300); background: var(--green-50); }
.choice-grid > label:has(input:checked) { border-color: var(--green-300); background: var(--green-50); }
fieldset.field { padding: 14px; border-radius: 14px; }

.qty-input, .target-input { border-radius: 8px; }

/* --------------------------------------------------------- dashboard e grafici */
.dashboard-grid, .dashboard-widgets { margin-bottom: 12px; }
.chart { height: 280px; }
.chart.sm { height: 214px; }
.dash-widget-row { border-radius: 12px; }
.btn-move { border-radius: 999px; width: 28px; height: 28px; }
.progress-track { height: 7px; border: 0; background: var(--line-soft); }
.progress-fill { background: linear-gradient(90deg, var(--green-300), var(--green-500)); }
.progress-fill.ok { background: linear-gradient(90deg, var(--green-500), var(--green-700)); }

/* --------------------------------------------------------- cassa del pannello */
.register-toolbar, .category-chips { padding: 10px 14px; }
.category-chip { padding: 5px 12px; font-size: var(--text-base); font-weight: 600; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.category-chip:hover { border-color: var(--green-300); background: var(--green-50); }
.category-chip.active { background: linear-gradient(180deg, var(--green-500), var(--green-600)); border-color: transparent; }
.product-grid { gap: 10px; padding: 14px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.product-tile { padding: 11px 12px; min-height: 104px; border-radius: 14px; border-color: var(--line-soft); box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease, transform .15s var(--ease-out); }
.product-tile:hover:not(:disabled) { border-color: var(--green-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-tile:active:not(:disabled) { transform: scale(.98); }
.product-price { font-size: var(--text-2xl); font-weight: 700; }
.cart-head { padding: 12px 14px; }
.cart-items { padding: 4px 14px; }
.cart-summary, .cart-checkout { padding: 10px 14px; }
.qty-control { border-color: var(--line); }
.qty-control button { width: 28px; height: 28px; }
.nonfiscal-note { border-radius: 999px; }
.payment-option { border-radius: 14px; padding: 14px; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.payment-option.selected { box-shadow: 0 0 0 3px var(--green-100); }
.cash-quick button { height: 38px; border-radius: 999px; }
.change-box { border-radius: 14px; padding: 10px 14px; }
.change-box strong { font-size: var(--text-4xl); }
.fav-toggle { color: var(--muted); } /* 1.99.3: la stella inattiva aveva contrasto 2,4:1, sotto il minimo di 3:1 per i controlli */
.fav-toggle.is-fav, .fav-toggle:hover { color: var(--sun); }

/* --------------------------------------------------------- finestre */
.modal-backdrop { background: rgba(6, 48, 31, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal { border-radius: var(--r-xl); animation: modal-in .22s var(--ease-out); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { padding: 14px 18px; border-bottom-color: var(--line-soft); }
.modal-head h2 { font-size: var(--text-xl); }
.modal-close { width: 30px; height: 30px; border-radius: 999px; font-size: var(--text-xl); }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top-color: var(--line-soft); }

/* --------------------------------------------------------- toast e vuoti */
.toast { border-radius: 14px; padding: 10px 14px; font-weight: 550; box-shadow: var(--shadow-lg); }
.toast.success { background: linear-gradient(135deg, var(--green-700), var(--green-600)); }
.empty-state { padding: 32px 14px; }
.empty-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--green-100); color: var(--green-600); }
.cart-empty .empty-icon { animation: soft-bob 3.2s ease-in-out infinite; }
@keyframes soft-bob { 50% { transform: translateY(-4px); } }

/* --------------------------------------------------------- altre sezioni */
.access-summary, .store-card-grid, .inv-metrics, .inv-lists { gap: 12px; }
.access-stat, .store-card { padding: 14px; }
.access-stat strong, .inv-metric strong { font-size: var(--text-4xl); font-family: var(--font-num); font-weight: 700; }
.inv-metric { border-color: var(--line-soft); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.store-card-code { color: var(--green-600); }
.startup-card, .startup-shift, .assist-card { border-radius: 14px; }
.settings-group-title { color: var(--green-700); }

.settings-layout { gap: 26px; }
.shift-chip { border-radius: 999px; }
.staff-grid .is-today { box-shadow: inset 0 3px 0 var(--green-500); }
.receipt { border-radius: 14px; }
.install-banner, .pwa-update-banner { border-radius: 16px; }
.offline-flag, .offline-badge { font-size: var(--text-xs); }

/* --------------------------------------------------------- accesso */
.login-visual {
    --mark-ring: var(--green-800);
    background:
        radial-gradient(520px 380px at 12% 8%, var(--green-500), transparent 70%),
        radial-gradient(420px 320px at 95% 100%, var(--green-600), transparent 70%),
        linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
    padding: 40px;
}
.login-orbit { border-color: rgba(255, 255, 255, .14); }
.orbit-one { animation: orbit-drift 16s ease-in-out infinite; }
.orbit-two { animation: orbit-drift 21s ease-in-out infinite reverse; }
@keyframes orbit-drift { 50% { transform: translate(22px, -16px) scale(1.05); } }
.login-visual-copy h1 { font-family: var(--font-head); font-size: var(--text-6xl); line-height: 1.12; }
.login-figure, .login-rules { border-radius: 22px; }
.login-figure-row { border-radius: 14px; }
.login-figure-bars i { border-radius: 4px 4px 0 0; background: var(--green-300); animation: bar-rise .9s var(--ease-out) both; transform-origin: bottom; }
.login-figure-bars i:nth-child(odd) { background: var(--green-500); }
.login-figure-bars i:nth-child(2) { animation-delay: .05s; } .login-figure-bars i:nth-child(3) { animation-delay: .1s; }
.login-figure-bars i:nth-child(4) { animation-delay: .15s; } .login-figure-bars i:nth-child(5) { animation-delay: .2s; }
.login-figure-bars i:nth-child(6) { animation-delay: .25s; } .login-figure-bars i:nth-child(7) { animation-delay: .3s; }
.login-figure-bars i:nth-child(8) { animation-delay: .35s; }
@keyframes bar-rise { from { transform: scaleY(.1); opacity: .3; } }
.login-panel { padding: 32px 24px; }
.login-card { gap: 11px; }
.login-card h2 { font-size: var(--text-5xl); }
.login-form input, .login-form select { height: 42px; border-radius: 12px; }
.login-form .btn { height: 44px; }
.demo-chip { color: var(--green-800); }
.portal-switch { border-radius: 16px; border-color: var(--line-soft); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s ease, background .15s ease, transform .15s var(--ease-out), box-shadow .15s ease; }
.portal-switch:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.portal-switch-icon { border-radius: 50%; background: var(--green-100); color: var(--green-700); }
.portal-switch-icon svg { stroke-width: 2; }

/* --------------------------------------------------------- avvio */
.app-splash { background: radial-gradient(600px 400px at 50% 40%, var(--green-100), transparent 70%), var(--bg); }
.app-splash-brand { font-family: var(--font-head); }
.app-splash-brand .brand-mark { border-radius: 18px; }
.app-splash-brand .brand-mark::after { width: 16px; height: 16px; top: -5px; right: -5px; box-shadow: 0 0 0 3px var(--bg); animation: dot-pop .7s var(--ease-out) .45s both; }
@keyframes dot-pop { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: none; } }

@media (max-width: 900px) {
    .main-content { padding: 16px 14px 44px; }
    .topbar { padding: 0 14px; }
}
@media (max-width: 560px) {
    .page-head h1 { font-size: var(--text-4xl); }
    .metrics-grid .metric-card { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .orbit-one, .orbit-two, .login-figure-bars i, .cart-empty .empty-icon, .metric-card::after,
    .app-splash-brand .brand-mark::after, .notification-count, .modal, .user-popover, .notification-panel { animation: none !important; transition: none !important; }
    .sidebar-nav a:hover { transform: none; }
}
@media print {
    body { background: #fff !important; }
}
