.summary-list {
    padding: 0 20px;
    margin-bottom: 24px;
}

.summary-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-item-unit {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.summary-item-values {
    display: flex;
    gap: 20px;
}

.summary-item-value {
    flex: 1;
}

.summary-item-value-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.summary-item-value-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.summary-grand-total {
    background: var(--primary);
    color: white;
    padding: 20px;
    margin: 0 20px 24px;
    border-radius: 12px;
    text-align: center;
}

.grand-total-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.grand-total-value {
    font-size: 32px;
    font-weight: 700;
}

/* ==========================================
   ARCHIVIO ARTICOLI
   ========================================== */

.archive-container {
    padding: 16px; /* Ridotto da 20px */
}

.articoli-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Ridotto da 12px */
    margin-top: 16px; /* Ridotto da 20px */
}

.articolo-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s;
}

.articolo-card:active {
    transform: scale(0.98);
}

.articolo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.articolo-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.articolo-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.2s;
}

.icon-button:active {
    transform: scale(0.9);
}

.articolo-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
}

.articolo-detail-item {
    display: flex;
    align-items: center;
}

.articolo-detail-value {
    font-weight: 600;
    color: var(--primary);
}

.articolo-categoria {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-help {
    display: block;
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* ==========================================
   MODAL
   ========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 16px;
    color: var(--gray-700);
}

.highlight-text {
    background: var(--gray-100);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 12px 0;
}

.warning-text {
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.modal-footer button {
    flex: 1;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:active {
    transform: scale(0.98);
    background: #dc2626;
}/* ==========================================
   CART/LISTA STYLES
   ========================================== */

.cart-container {
    padding: 20px;
}

.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.cart-empty-state p {
    font-size: 16px;
    color: var(--gray-600);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cart-item {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-item-unit {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 8px;
    color: white;
}

.cart-item-remove {
    background: var(--danger);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cart-item-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-value-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cart-item-value-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.btn-add-article {
    margin-bottom: 20px;
}

.cart-summary {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-summary-row:last-child {
    border-bottom: none;
}

.cart-summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 12px;
}

.cart-summary-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.cart-summary-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.cart-summary-row.total .cart-summary-value {
    color: var(--primary);
    font-size: 20px;
}/* ==========================================
   IN&OUT - Unified App Styles
   ========================================== */

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #374151;  /* Reso più leggibile (era #111827) */
    
    /* Spacing */
    --header-height: 110px;
    --stats-height: 50px;
    --bottom-nav-height: 70px;
    
    /* Animation */
    --transition-speed: 0.3s;
    --swipe-threshold: 80px;
}

/* ==========================================
   RESET & BASE
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

/* ==========================================
   FIXED HEADER
   ========================================== */

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    height: 60px;
}

.app-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: var(--danger);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==========================================
   STATS BAR
   ========================================== */

.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 12px 20px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    height: var(--stats-height);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* ==========================================
   BOTTOM NAVIGATION - REMOVED
   (eliminata in favore dei pulsanti in home)
   ========================================== */

/* Vecchi stili commentati - mantenuti per riferimento
.bottom-nav {
    position: fixed;
    bottom: 0;
    ...
}
*/

/* ==========================================
   MAIN CONTAINER (no swipe)
   ========================================== */

.main-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0; /* Nessuna bottom-nav, spazio pieno */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen {
    min-width: 100vw;
    width: 100vw;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.screen-content {
    min-height: 100%;
    padding-bottom: 20px;
}

/* ==========================================
   VIEWS (dentro le screen)
   ========================================== */

.view {
    display: none !important; /* IMPORTANTE: nasconde TUTTE le view di default */
    animation: fadeIn 0.3s ease-in-out;
}

.view.active {
    display: block !important; /* Solo la view attiva è visibile */
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   SCREEN IN - LANDING
   ========================================== */

.landing-content {
    padding: 12px 20px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 16px;
}

.welcome-icon {
    font-size: 72px;
    margin-bottom: 16px;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--gray-600);
}

.card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.card-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.card-description {
    font-size: 14px;
    color: var(--gray-600);
}

.card-arrow {
    font-size: 32px;
    color: var(--gray-300);
    flex-shrink: 0;
}

/* ==========================================
   SCREEN IN - FORM
   ========================================== */

.form-header {
    padding: 12px 16px; /* OTTIMIZZATO: ridotto padding verticale */
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px; /* OTTIMIZZATO: ridotto da 10px */
}

.btn-back {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-title {
    font-size: 22px; /* OTTIMIZZATO: ridotto da 24px */
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.btn-articoli {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
}

.btn-articoli:active {
    transform: scale(0.98);
    background: var(--gray-200);
}

.btn-articoli-icon {
    font-size: 20px;
}

.btn-articoli-text {
    flex: 1;
}

.entry-form {
    padding: 20px; /* OTTIMIZZATO: ridotto da 24px */
}

.form-group {
    margin-bottom: 20px; /* OTTIMIZZATO: ridotto da 24px */
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: white;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-select {
    cursor: pointer;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn-primary {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:active {
    transform: scale(0.98);
    background: var(--primary-dark);
}

.btn-secondary {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 12px;
}

.btn-secondary:active {
    transform: scale(0.98);
    background: var(--gray-200);
}

.btn-link {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-submit {
    margin-top: 32px;
}

/* ==========================================
   SCREEN IN - SUMMARY
   ========================================== */

.summary-header {
    text-align: center;
    padding: 40px 20px 24px;
}

.summary-icon {
    font-size: 64px;
    color: var(--success);
    margin-bottom: 16px;
}

.summary-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.summary-card {
    margin: 0 20px 32px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.summary-value {
    font-size: 16px;
    color: var(--gray-900);
    font-weight: 600;
}

/* ==========================================
   LONG PRESS BUTTON
   ========================================== */

.confirm-section {
    padding: 0 20px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-confirm {
    position: relative;
    width: 120px;
    height: 120px;
    border: none;
    background: var(--success);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.btn-confirm:active {
    transform: scale(0.95);
}

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 6;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.1s linear;
}

.btn-confirm-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: white;
}

.btn-confirm-text {
    font-size: 12px;
    font-weight: 600;
}

.btn-confirm-timer {
    font-size: 32px;
    font-weight: 700;
}

.confirm-hint {
    font-size: 14px;
    color: var(--gray-600);
    text-align: center;
}

/* ==========================================
   SCREEN IN - SUCCESS
   ========================================== */

.success-content {
    padding: 60px 20px;
    text-align: center;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.success-message {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 40px;
}

/* ==========================================
   SCREEN OUT - ENTRIES LIST
   ========================================== */

.out-header {
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar {
    margin-bottom: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

.entries-container {
    padding: 16px 20px;
}

.loading-state,
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-600);
}

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.entry-unit {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 8px;
    color: white;
}

.entry-date {
    font-size: 12px;
    color: var(--gray-600);
}

.entry-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.entry-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry-value-label {
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.entry-value-number {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

/* ==========================================
   PULL TO REFRESH
   ========================================== */

.pull-refresh {
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s;
}

.pull-refresh.pulling {
    transform: translateY(60px);
}

.pull-refresh-icon {
    font-size: 24px;
    transition: transform 0.3s;
}

.pull-refresh.pulling .pull-refresh-icon {
    transform: rotate(180deg);
}

.pull-refresh-text {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 600;
}

/* ==========================================
   OFFLINE QUEUE BADGE
   ========================================== */

.queue-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--warning);
    color: white;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.queue-icon {
    font-size: 20px;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */

.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: var(--gray-600);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (min-width: 768px) {
    .swipe-container {
        max-width: 480px;
        margin: 0 auto;
    }
    
    .fixed-header {
        max-width: 480px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================
   UTILITIES
   ========================================== */

.hidden {
    display: none !important;
}

.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
 
/* v2.0 ADDITIONS */ 
/* ==========================================
   IN&OUT v2.0 - STILI AGGIUNTIVI
   Sistema Articoli + Categorie Colorate
   Da aggiungere al file styles.css esistente
   ========================================== */

/* ==========================================
   CATEGORIA BADGES (con colori)
   ========================================== */

.categoria-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.categoria-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    margin-left: 6px;
    white-space: nowrap;
}

/* Header categoria nelle liste */
.categoria-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 16px 0 8px 0;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-left: 3px solid;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

/* ==========================================
   SELEZIONE ARTICOLO
   ========================================== */

.select-container {
    padding: 0 20px 100px 20px;
}

.select-articoli-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.select-articolo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 72px;
}

.select-articolo-card:active {
    transform: scale(0.98);
    background: #f9fafb;
}

.select-articolo-main {
    flex: 1;
    min-width: 0;
}

.select-articolo-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-articolo-details {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.select-articolo-arrow {
    font-size: 1.5rem;
    color: #9ca3af;
    margin-left: 12px;
    flex-shrink: 0;
}

/* ==========================================
   INFO ARTICOLO SELEZIONATO
   ========================================== */

.selected-articolo-info {
    margin: 0 20px 24px 20px;
}

.articolo-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.articolo-info-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.articolo-info-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
    opacity: 0.95;
}

.articolo-info-details span {
    display: block;
}

/* Badge dentro info card */
.articolo-info-card .categoria-badge {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    margin-bottom: 8px;
}

/* ==========================================
   CALCULATION PREVIEW
   ========================================== */

.calculation-preview {
    margin: 24px 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 12px;
    display: none; /* Mostrato solo quando c'è preview */
}

.calculation-preview.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(2, 132, 199, 0.1);
}

.preview-row:last-child {
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #0284c7;
}

.preview-label {
    font-size: 0.875rem;
    color: #0369a1;
    font-weight: 500;
}

.preview-value {
    font-size: 1rem;
    color: #075985;
    font-weight: 700;
}

.preview-row:last-child .preview-value {
    font-size: 1.25rem;
    color: #0c4a6e;
}

/* ==========================================
   CART ITEMS AGGIORNATO
   ========================================== */

.cart-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.cart-item-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.cart-item-remove:active {
    background: #fecaca;
    transform: scale(0.95);
}

.cart-item-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.cart-item-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #059669;
}

/* ==========================================
   SUMMARY AGGIORNATO
   ========================================== */

.summary-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.summary-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-item-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    flex: 1;
}

.summary-item-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
}

.summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.summary-detail-label {
    color: #6b7280;
}

.summary-detail-value {
    color: #111827;
    font-weight: 600;
}

.summary-detail-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #e5e7eb;
}

.summary-detail-row.total .summary-detail-label {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}

.summary-detail-row.total .summary-detail-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

/* ==========================================
   ARTICOLI LIST (Archivio)
   ========================================== */

.articoli-list {
    padding: 0 20px 100px 20px;
}

.articolo-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.articolo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.articolo-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.articolo-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:active {
    transform: scale(0.95);
}

.edit-btn:active {
    background: #dbeafe;
}

.delete-btn:active {
    background: #fee2e2;
}

.articolo-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.articolo-detail-item {
    display: inline-block;
}

.articolo-detail-value {
    font-weight: 600;
    color: #059669;
}

/* ==========================================
   SEARCH CONTAINERS
   ========================================== */

.search-container {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

/* ==========================================
   FILTER TABS DINAMICI (Storico)
   ========================================== */

.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.filter-tab:active {
    transform: scale(0.95);
}

/* ==========================================
   ENTRIES AGGIORNATE (Storico)
   ========================================== */

.entry-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.entry-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.entry-date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: 12px;
}

.entry-values {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.entry-value {
    flex: 1;
}

.entry-value-label {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.entry-value-number {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.entry-value:last-child .entry-value-number {
    color: #059669;
}

/* ==========================================
   RESPONSIVE & ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile ottimizzazioni */
@media (max-width: 380px) {
    .cart-item-name,
    .articolo-name,
    .select-articolo-name {
        font-size: 0.9375rem;
    }
    
    .categoria-badge {
        font-size: 0.8125rem;
        padding: 3px 10px;
    }
    
    .categoria-badge-small {
        font-size: 0.6875rem;
        padding: 2px 6px;
    }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Da implementare se necessario */
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-small {
    gap: 8px;
}

.gap-medium {
    gap: 16px;
}

/* ==========================================
   CARD PRIMARY (Pulsante + Principale)
   ========================================== */

.card-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: white;
    padding: 24px 20px;
}

.card-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.card-primary .card-icon-large {
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
    color: white;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    flex-shrink: 0;
}

.card-primary .card-title {
    color: white;
    font-size: 20px;
}

.card-primary .card-description {
    color: rgba(255, 255, 255, 0.9);
}

.card-primary .card-arrow {
    color: rgba(255, 255, 255, 0.7);
}

/* ==========================================
   FINE STILI v2.0
   ========================================== */
 
/* ========================================== 
   v2.0 ADDITIONS - Sistema Articoli 
   ========================================== */ 
/* ==========================================
   IN&OUT v2.0 - STILI AGGIUNTIVI
   Sistema Articoli + Categorie Colorate
   Da aggiungere al file styles.css esistente
   ========================================== */

/* ==========================================
   CATEGORIA BADGES (con colori)
   ========================================== */

.categoria-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.categoria-badge-small {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
    margin-left: 6px;
    white-space: nowrap;
}

/* Header categoria nelle liste */
.categoria-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 16px 0 8px 0;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-left: 3px solid;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

/* ==========================================
   SELEZIONE ARTICOLO
   ========================================== */

.select-container {
    padding: 0 20px 100px 20px;
}

.select-articoli-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.select-articolo-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 72px;
}

.select-articolo-card:active {
    transform: scale(0.98);
    background: #f9fafb;
}

.select-articolo-main {
    flex: 1;
    min-width: 0;
}

.select-articolo-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.select-articolo-details {
    font-size: 0.875rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.select-articolo-arrow {
    font-size: 1.5rem;
    color: #9ca3af;
    margin-left: 12px;
    flex-shrink: 0;
}

/* ==========================================
   INFO ARTICOLO SELEZIONATO
   ========================================== */

.selected-articolo-info {
    margin: 0 20px 24px 20px;
}

.articolo-info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.articolo-info-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.articolo-info-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.875rem;
    opacity: 0.95;
}

.articolo-info-details span {
    display: block;
}

/* Badge dentro info card */
.articolo-info-card .categoria-badge {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    margin-bottom: 8px;
}

/* ==========================================
   CALCULATION PREVIEW
   ========================================== */

.calculation-preview {
    margin: 24px 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #bae6fd;
    border-radius: 12px;
    display: none; /* Mostrato solo quando c'è preview */
}

.calculation-preview.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0369a1;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(2, 132, 199, 0.1);
}

.preview-row:last-child {
    border-bottom: none;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 2px solid #0284c7;
}

.preview-label {
    font-size: 0.875rem;
    color: #0369a1;
    font-weight: 500;
}

.preview-value {
    font-size: 1rem;
    color: #075985;
    font-weight: 700;
}

.preview-row:last-child .preview-value {
    font-size: 1.25rem;
    color: #0c4a6e;
}

/* ==========================================
   CART ITEMS AGGIORNATO
   ========================================== */

.cart-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.cart-item-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}

.cart-item-remove:active {
    background: #fecaca;
    transform: scale(0.95);
}

.cart-item-details {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.cart-item-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #059669;
}

/* ==========================================
   SUMMARY AGGIORNATO
   ========================================== */

.summary-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.summary-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-item-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    flex: 1;
}

.summary-item-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
}

.summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.summary-detail-label {
    color: #6b7280;
}

.summary-detail-value {
    color: #111827;
    font-weight: 600;
}

.summary-detail-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #e5e7eb;
}

.summary-detail-row.total .summary-detail-label {
    font-weight: 700;
    color: #111827;
    font-size: 1rem;
}

.summary-detail-row.total .summary-detail-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #059669;
}

/* ==========================================
   ARTICOLI LIST (Archivio)
   ========================================== */

.articoli-list {
    padding: 0 20px 100px 20px;
}

.articolo-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.articolo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.articolo-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.articolo-actions {
    display: flex;
    gap: 8px;
}

.icon-button {
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:active {
    transform: scale(0.95);
}

.edit-btn:active {
    background: #dbeafe;
}

.delete-btn:active {
    background: #fee2e2;
}

.articolo-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    flex-wrap: wrap;
}

.articolo-detail-item {
    display: inline-block;
}

.articolo-detail-value {
    font-weight: 600;
    color: #059669;
}

/* ==========================================
   SEARCH CONTAINERS
   ========================================== */

.search-container {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

/* ==========================================
   FILTER TABS DINAMICI (Storico)
   ========================================== */

.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    background: white;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.filter-tab:active {
    transform: scale(0.95);
}

/* ==========================================
   ENTRIES AGGIORNATE (Storico)
   ========================================== */

.entry-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.entry-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.entry-date {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: 12px;
}

.entry-values {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.entry-value {
    flex: 1;
}

.entry-value-label {
    font-size: 0.75rem;
    color: #6b7280;
    display: block;
    margin-bottom: 4px;
}

.entry-value-number {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.entry-value:last-child .entry-value-number {
    color: #059669;
}

/* ==========================================
   RESPONSIVE & ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile ottimizzazioni */
@media (max-width: 380px) {
    .cart-item-name,
    .articolo-name,
    .select-articolo-name {
        font-size: 0.9375rem;
    }
    
    .categoria-badge {
        font-size: 0.8125rem;
        padding: 3px 10px;
    }
    
    .categoria-badge-small {
        font-size: 0.6875rem;
        padding: 2px 6px;
    }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Da implementare se necessario */
}

/* ==========================================
   UTILITIES
   ========================================== */

.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-small {
    gap: 8px;
}

.gap-medium {
    gap: 16px;
}

/* ==========================================
   SETTINGS PAGE
   ========================================== */

.settings-container {
    padding: 16px 20px 100px; /* Spazio in fondo per scroll */
}

.settings-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.settings-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

.settings-item:last-of-type {
    border-bottom: none;
}

.settings-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.settings-value {
    font-size: 0.875rem;
    color: var(--gray-900);
    font-weight: 700;
}

.settings-section .btn-primary,
.settings-section .btn-secondary {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.settings-notice {
    padding: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: 12px;
    text-align: center;
}

.notice-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.settings-notice p {
    color: var(--gray-900);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 6px;
}

.notice-subtitle {
    color: var(--gray-600);
    font-size: 0.8125rem;
}

.settings-about {
    padding: 12px;
    text-align: center;
}

.settings-about p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.settings-about strong {
    color: var(--primary);
    font-weight: 700;
}

.settings-about-footer {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-top: 12px;
}

/* ==========================================
   FINE STILI v2.0
   ========================================== */
