﻿:root {
  --verde: #006414;
  --verde-hover: #00440e;
  --verde-chiaro: #fdfd96;
  --sfondo: #f4f7f6;
  --bianco: #ffffff;
  --testo: #333333;
  --rosso: #d32f2f;
  --grigio-chiaro: #f9f9f6;
  --blu: #0056b3;
}

/* ================= CARICAMENTO FONT MANUALE ================= */
@font-face {
    font-family: 'AirConditionerCustom'; /* Diamo un nome al font per usarlo dopo */
    src: url('fonts/AirConditioner.ttf') format('truetype'); /* IMPORTANTE: Assicurati che il nome del file qui sia uguale a quello che hai caricato */
    font-weight: normal;
    font-style: normal;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--sfondo);
  color: var(--testo); height: 100vh; display: flex; flex-direction: column;
}

/* ================= HEADER ================= */
.header-80s {
  background: linear-gradient(to right, #fff 0%, #fdfd96 100%);
  padding: 10px 20px; border-top: 4px solid var(--verde);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1); flex-shrink: 0;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 100; position: relative;
  transition: all 0.3s;
}

.header-actions { display: flex; gap: 10px; align-items: center; }

.header-brand { display: flex; flex-direction: column; align-items: center; user-select: none; z-index: 101; position: relative; }
.brand-line { border-top: 3px solid var(--verde); width: 100px; margin-bottom: 5px; }
h1 {
  margin: 0; font-size: 32px; font-weight: 300; color: var(--verde);
  letter-spacing: 4px; text-transform: uppercase; line-height: 1;
}

/* Pulsanti Header */
.btn-nav-circle, .btn-user, .btn-cart, .btn-close-order {
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.2s;
}
.btn-nav-circle:active, .btn-cart:active, .btn-close-order:active { transform: scale(0.9); }

.btn-nav-circle {
  background: var(--verde); color: white; width: 40px; height: 40px; border-radius: 50%;
  font-size: 24px; font-weight: bold; box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-user { background: none; color: var(--verde); padding: 5px; border-radius: 50%; }
.btn-user svg { width: 26px; height: 26px; fill: currentColor; }
.btn-user:hover { background: rgba(0,100,20,0.1); }

.btn-cart { background: white; color: var(--verde); border: 2px solid var(--verde); width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn-cart svg { width: 22px; height: 22px; fill: currentColor; }
.btn-cart:hover { background: var(--verde); color: white; }

.btn-close-order {
  background: white; color: var(--verde); border: 2px solid var(--verde);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-close-order svg { width: 24px; height: 24px; fill: currentColor; }
.btn-close-order:hover { background: var(--verde); color: white; }

/* Dropdown Menu Utente */
.user-dropdown {
  position: absolute; top: 60px; right: 20px; background: white; width: 260px;
  border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.15);
  list-style: none; padding: 10px 0; margin: 0; z-index: 200; overflow: hidden;
}
.user-dropdown.hidden { display: none; }
.user-dropdown li {
  padding: 12px 20px; cursor: pointer; font-size: 0.95rem; color: #555; transition: all 0.2s;
  display: flex; justify-content: space-between; align-items: center;
}
.user-dropdown li:hover { background-color: #f0fff4; color: var(--verde); padding-right: 25px; }
.user-dropdown li.logout-item {
  margin-top: 5px; border-top: 1px solid #f0f0f0; color: var(--rosso); font-weight: bold; border-radius: 0 0 15px 15px;
}
.user-dropdown li.logout-item:hover { background-color: #fff0f0; color: var(--rosso); }

/* ================= VIEWS ================= */
.app-container { flex: 1; position: relative; overflow: hidden; max-width: 800px; width: 100%; margin: 0 auto; }

/* View Generale */
.view {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  overflow-y: auto; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  display: flex; flex-direction: column; align-items: center;
}
.view.active { opacity: 1; pointer-events: auto; z-index: 10; }
.view.hidden { display: none; opacity: 0; pointer-events: none; }

/* View Specifica per Admin */
#view-admin {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden; 
}

/* ================= ADMIN PANEL ================= */
.admin-sticky-header {
  flex-shrink: 0; 
  background: var(--sfondo);
  padding: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  z-index: 20;
  width: 100%;
  max-width: 450px; 
  margin: 0 auto;
}

.admin-scrollable-list {
  flex-grow: 1; 
  overflow-y: auto; 
  padding: 20px; 
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 450px; 
  margin: 0 auto;
}

.admin-header { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0 10px 0; margin-bottom: 10px; }
.admin-header h2 { display: none; } /* Titolo nascosto */

.admin-dashboard { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 25px; }
.stat-card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; border-top: 4px solid var(--verde); }
.stat-card h3 { margin: 0; font-size: 2rem; color: var(--verde); }
.stat-card p { margin: 5px 0 0; color: #666; font-size: 0.9rem; text-transform: uppercase; }
.admin-filters { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; width: 100%; }
.filter-btn { background: #eee; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; color: #666; white-space: nowrap; }
.filter-btn.active { background: var(--verde); color: white; box-shadow: 0 2px 5px rgba(0,100,20,0.3); }
.admin-list { width: 100%; display: flex; flex-direction: column; gap: 15px; padding-bottom: 50px; }
.admin-order-card { background: white; border-radius: 10px; padding: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-left: 5px solid #ccc; cursor: pointer; }
.admin-order-card:hover { transform: translateX(5px); }
.admin-card-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.admin-company { font-weight: bold; font-size: 1.1rem; }
.admin-date { font-size: 0.85rem; color: #777; }
.admin-doc-type { display: inline-block; background: #eee; padding: 2px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; color: #555; margin-left: 10px; }
.admin-totals { text-align: right; font-weight: bold; color: var(--verde); margin-top: 5px; font-size: 1.1rem; }
.status-badge { padding: 4px 10px; border-radius: 12px; color: white; font-size: 0.8rem; font-weight: bold; }
.status-nuovo { background-color: #2196F3; }
.status-in_preparazione { background-color: #FF9800; }
.status-completato { background-color: #4CAF50; }
.status-annullato { background-color: #9E9E9E; }
.admin-status-pill {
  flex: 1; padding: 8px 12px; border-radius: 50px; border: 1px solid #ccc;
  background: white; color: #555; font-size: 0.9rem; font-weight: bold; cursor: pointer;
  transition: all 0.2s; text-align: center; min-width: 80px;
}
.admin-status-pill:hover { background: #f0f0f0; transform: translateY(-2px); }
.admin-status-pill[data-status="nuovo"].active { background: #2196F3; color: white; border-color: #2196F3; }
.admin-status-pill[data-status="in_preparazione"].active { background: #FF9800; color: white; border-color: #FF9800; }
.admin-status-pill[data-status="completato"].active { background: #4CAF50; color: white; border-color: #4CAF50; }
.admin-status-pill[data-status="annullato"].active { background: #9E9E9E; color: white; border-color: #9E9E9E; }

/* ================= SEARCH BAR ================= */
.search-wrapper { width: 100%; max-width: 550px; margin-top: 30px; position: relative; z-index: 50; }
.pos-wrapper { margin-top: 10px; margin-bottom: 20px; }
.input-container {
  position: relative; display: flex; align-items: center;
  background: var(--bianco); border: 1px solid #ccc; border-radius: 25px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05); height: 50px;
}
input {
  width: 100%; height: 100%; border: none; outline: none;
  padding: 0 100px 0 20px; font-size: 1rem; background: transparent; border-radius: 25px;
}
.search-actions {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.icon-btn { background: none; border: none; cursor: pointer; color: var(--verde); padding: 6px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.scanner-circle { border: 1px solid var(--verde); border-radius: 50%; padding: 4px; display: flex; align-items: center; justify-content: center; }
.dropdown-list {
  position: absolute; top: 110%; left: 0; width: 100%; z-index: 100;
  background: var(--bianco); border: 1px solid #ddd; border-radius: 0 0 12px 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); list-style: none; padding: 0; margin: 0; max-height: 300px; overflow-y: auto;
}
.dropdown-list.hidden { display: none; }
.dropdown-list li { 
  padding: 12px 20px; 
  border-bottom: 1px solid #f9f9f9; 
  cursor: pointer; /* <--- AGGIUNGI QUESTO */
  transition: background 0.1s; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
}
.dropdown-list li:hover { background: var(--verde-chiaro); color: var(--verde); }
.home-hint { text-align: center; color: #999; margin-top: 20px; font-style: italic; }

/* ================= CRONOLOGIA RICERCA ================= */
.search-history-wrapper {
  width: 100%; max-width: 550px; margin-top: 20px;
  background: white; border-radius: 15px; padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.history-title {
  margin: 0; color: var(--verde); font-size: 1rem; font-weight: 300; letter-spacing: 1px;
}
.history-list {
  display: flex; flex-direction: column; gap: 5px; max-height: 250px; overflow-y: auto;
}
.history-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-bottom: 1px solid #f5f5f5; font-size: 0.9rem;
}
.history-item:last-child { border-bottom: none; }
.remove-history-btn {
  color: #999; cursor: pointer; margin-left: 10px; font-weight: bold; padding: 5px;
}
.remove-history-btn:hover { color: var(--rosso); }
.btn-clear-history {
  background: none; border: 1px solid #ccc; border-radius: 15px;
  color: #666; font-size: 0.7rem; padding: 4px 10px; cursor: pointer;
  transition: all 0.2s;
}
.btn-clear-history:hover { background: #eee; color: var(--rosso); border-color: var(--rosso); }

/* ================= AUTH & BOXES ================= */
.box {
  background: var(--bianco); padding: 0; border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08); width: 100%; max-width: 420px; 
  margin-top: 40px; margin-bottom: 40px; border-top: 5px solid var(--verde);
  box-sizing: border-box; overflow: hidden;
}
.auth-header-visual { background: #fafafa; padding: 25px 30px 20px 30px; text-align: center; border-bottom: 1px solid #eee; }
.auth-header-visual h3 { margin: 0; color: var(--verde); font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; }
.auth-header-visual p { margin: 5px 0 0 0; color: #777; font-size: 0.9rem; }
.register-box { max-height: 85vh; overflow-y: auto; } 
.auth-form-body { padding: 30px; display: flex; flex-direction: column; gap: 15px; }
input.auth-input {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid #e0e0e0; border-radius: 10px;
  outline: none; font-size: 1rem; background-color: var(--grigio-chiaro);
  color: var(--testo); transition: all 0.2s; box-sizing: border-box;
}
input.auth-input:focus { background-color: white; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(0, 100, 20, 0.1); }
.btn-full { width: 100%; padding: 14px; border-radius: 10px; font-size: 1rem; cursor: pointer; border: none; font-weight: bold; box-sizing: border-box; margin-top: 10px; transition: background 0.2s; }
.btn-primary {
  background: var(--verde); color: white; text-transform: uppercase; letter-spacing: 1px;
  box-shadow: 0 4px 6px rgba(0,100,20,0.2); border: 1px solid var(--verde-hover);
}
.btn-primary:hover { background: var(--verde-hover); }
.btn-secondary { background: transparent; color: var(--verde); border: 2px solid var(--verde); text-transform: uppercase; font-size: 0.9rem; }
.btn-secondary:hover { background: #f0fff4; }
.btn-confirm-big { 
  background: var(--verde); color: white; font-size: 1.2rem; margin-top: 20px; 
  padding: 16px; box-shadow: 0 4px 10px rgba(0,100,20,0.2); 
  border-radius: 12px; text-transform: uppercase; letter-spacing: 1px;
}
.auth-footer { margin-top: 25px; text-align: center; font-size: 0.9rem; color: #666; padding-bottom: 10px; }
.link-text { color: var(--verde); font-weight: bold; cursor: pointer; text-decoration: underline; }

/* ================= POS ORDER ================= */
.order-container { width: 100%; max-width: 600px; background: white; border-radius: 15px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); flex: 1; display: flex; flex-direction: column; }
.order-header {
  display: flex; justify-content: space-between; align-items: center; 
  border-bottom: 2px solid var(--verde); padding-bottom: 10px; margin-bottom: 15px; padding-right: 10px;
}
.user-badge { background: var(--verde); color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.8rem; font-weight: bold; }
.order-list { list-style: none; padding: 0; margin: 0; flex: 1; overflow-y: auto; border: 1px solid #f0f0f0; border-radius: 8px; margin-bottom: 10px; }
.order-list li { padding: 10px 15px; border-bottom: 1px solid #f9f9f9; display: flex; flex-direction: column; transition: background 0.1s;}
.order-list li:hover { background: #fdfdfd; }
.order-list li > div:first-child { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.qty-controls { display: flex; align-items: center; gap: 8px; margin-top: 5px; align-self: flex-end; }
.qty-btn { 
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid #ccc; 
  background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; 
  font-weight: bold; font-size: 1.1rem; color: var(--verde); flex-shrink: 0; transition: all 0.2s;
}
.qty-btn:hover { background: var(--verde); color: white; border-color: var(--verde); }
.qty-btn.btn-del { color: var(--rosso); border-color: var(--rosso); margin-left: 5px; }
.qty-btn.btn-del:hover { background: var(--rosso); color: white; border-color: var(--rosso); }
.totals-box { background: #f9f9f9; padding: 15px; border-radius: 8px; }
.total-row { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: 1rem; }
.total-row.finale { font-size: 1.4rem; font-weight: bold; color: var(--verde); margin-top: 10px; border-top: 1px solid #ddd; padding-top: 10px; }

/* ================= DOC BUTTONS ================= */
.doc-btn-group { display: flex; gap: 15px; justify-content: center; width: 100%; }
.doc-btn { flex: 1; padding: 15px 10px; border-radius: 8px; font-size: 1.1rem; font-weight: bold; cursor: pointer; border: 2px solid var(--verde); background: white; color: var(--verde); display: flex; align-items: center; justify-content: center; }
.doc-btn:active { transform: scale(0.98); }
.doc-btn.doc-active { background: var(--verde); color: white; }

/* ================= USER HISTORY & PROFILE ================= */
.order-history-item { background: white; border-radius: 8px; padding: 15px; margin-bottom: 10px; border-left: 4px solid var(--verde); box-shadow: 0 1px 3px rgba(0,0,0,0.1); cursor: pointer; }
.order-history-header { display: flex; justify-content: space-between; font-weight: bold; font-size: 0.9rem; color: #555; }
.order-history-date { font-size: 0.8rem; color: #888; }
.order-history-total { text-align: right; font-weight: bold; color: var(--verde); margin-top: 5px; }

/* ================= PREFERITI ================= */
.fav-icon {
  cursor: pointer;
  color: #ccc;
  margin-left: 10px;
  transition: color 0.2s;
}
.fav-icon.active {
  color: var(--verde);
}
.search-fav-toggle {
  border: 1px solid var(--verde);
  border-radius: 50%;
  width: 32px; 
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
}
.search-fav-toggle svg { width: 18px; height: 18px; fill: #ccc; }
.search-fav-toggle.active {
  background: var(--verde);
  border-color: var(--verde);
}
.search-fav-toggle.active svg { fill: white; }

/* Badge Esaurito */
.stock-badge {
  font-size: 0.7rem; padding: 2px 6px; border-radius: 4px;
  background-color: var(--verde); color: white; font-weight: bold;
  margin-left: 5px;
}

/* ================= NUOVI STILI (ULTIME RICHIESTE) ================= */

/* Icona Admin (Stonks) */
.btn-admin { 
  background: none; color: var(--verde); padding: 5px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; 
}
.btn-admin svg { width: 26px; height: 26px; fill: currentColor; }
.btn-admin:hover { background: rgba(0,100,20,0.1); transform: scale(1.1); }

/* Prompt Login (Pillola cliccabile) */
.login-prompt-container {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 6000; cursor: pointer; pointer-events: auto;
  animation: slideUp 0.3s ease-out;
}
.login-prompt-content {
  background: var(--verde); color: white; padding: 12px 24px; border-radius: 50px;
  font-weight: bold; box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px;
}
.login-prompt-content .arrow { font-size: 1.2rem; }
.login-prompt-container:hover { transform: translateX(-50%) scale(1.05); }
@keyframes slideUp { from { transform: translate(-50%, 100%); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* Bottone Home "Torna al carrello" */
.btn-home-cart-prompt {
  background: white; color: var(--verde); border: 2px solid var(--verde);
  padding: 10px 20px; border-radius: 50px; font-weight: bold; cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: all 0.2s;
}
.btn-home-cart-prompt:hover { background: var(--verde); color: white; }


/* STILE PULSANTE TOGGLE STOCK */
.btn-stock-toggle {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  margin-bottom: 20px;
}
.btn-stock-toggle.available {
  background: white !important;
  color: #666 !important;
  border: 2px solid var(--verde) !important;
}
.btn-stock-toggle.exhausted {
  background: var(--verde) !important;
  color: white !important;
  border: 2px solid var(--verde) !important;
}

/* ================= MODALS ================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-overlay.hidden { display: none; }
.modal-content { background: white; width: 90%; max-width: 500px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; box-sizing: border-box; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.large-modal { max-width: 600px; } 
.modal-header { background: var(--verde); color: white; padding: 15px; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { margin: 0; text-align: left; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: white; font-size: 24px; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; }

/* ================= LOADER & UTILS ================= */
.loader-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 3000; display: flex; flex-direction: column;
  align-items: center; justify-content: center; transition: opacity 0.3s;
}
.loader-overlay.hidden { opacity: 0; pointer-events: none; }
.spinner {
  width: 50px; height: 50px; border: 5px solid #f3f3f3;
  border-top: 5px solid var(--verde); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text { margin-top: 15px; color: var(--verde); font-weight: bold; font-size: 1.1rem; }
#toast { visibility: hidden; min-width: 300px; max-width: 90%; background-color: rgba(255, 255, 255, 0.95); color: var(--verde); text-align: center; border-radius: 50px; padding: 16px 30px; position: fixed; z-index: 5000; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.3s; box-shadow: 0 10px 30px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 600; border: 2px solid transparent; }
#toast.show { visibility: visible; opacity: 1; }
#toast.success { background-color: rgba(0, 100, 20, 0.95); color: white; border: 2px solid var(--verde); }
#toast.error { background-color: white; color: var(--rosso); border: 2px solid var(--rosso); }
#toast.info { background-color: white; color: var(--verde); border: 2px solid var(--verde); }
.hidden { display: none !important; }

/* ===== ANIMAZIONE MICROFONO VERDE ===== */
.icon-btn.listening {
  background: rgba(0, 100, 20, 0.2); /* Verde trasparente */
  color: var(--verde);
  border: 1px solid var(--verde);
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(0, 100, 20, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(0, 100, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 100, 20, 0); }
}
#reader { 
  width: 100%; 
  max-width: 500px; 
  margin: 0 auto; 
  min-height: 300px; /* <--- AGGIUNTO IMPORTANTE: evita il crash su mobile */
  background: #000;  /* <--- AGGIUNTO: sfondo nero per la fotocamera */
  border-radius: 8px;
  overflow: hidden;  /* <--- AGGIUNTO: evita che il video esca dai bordi */
}
#reader video { 
  width: 100% !important; 
  height: auto !important; 
  border-radius: 8px; 
  object-fit: cover; /* <--- AGGIUNTO: migliora il fill del video */
}
.status-bozza { background-color: #FF9800 !important; animation: pulse-badge 2s infinite; }
@keyframes pulse-badge { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.btn-delete-cancel { background-color: white; color: var(--verde); border: 2px solid var(--verde); border-radius: 50px; }
.btn-delete-cancel:hover { background-color: #f0fff4; }
.btn-delete-confirm { background-color: var(--verde); color: white; border: 2px solid var(--verde); border-radius: 50px; font-weight: bold; }
.btn-delete-confirm:hover { background-color: var(--verde-hover); border-color: var(--verde-hover); }
.btn-back-icon {
  background: transparent; border: 2px solid var(--verde); color: var(--verde);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; padding: 0;
}
.btn-back-icon svg { width: 24px; height: 24px; fill: currentColor; margin-left: -3px; }
.btn-back-icon:hover { background: var(--verde); color: white; transform: translateX(-3px); }

/* Dettaglio Storico Utente */
#userOrderDetailContent ul { list-style: none; padding: 0; margin: 0; }
#userOrderDetailContent li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; }
.detail-total-row { margin-top: 15px; font-weight: bold; font-size: 1.2rem; text-align: right; color: var(--verde); }

/* ================= MOBILE ADMIN UI ================= */
@media (max-width: 768px) {
  .admin-sticky-header, .admin-scrollable-list {
    padding: 10px;
  }
  .admin-header h2 { font-size: 1.4rem; }
  .admin-dashboard { gap: 10px; }
  .stat-card { padding: 10px; }
  .stat-card h3 { font-size: 1.5rem; }
  .admin-filters { padding-bottom: 0; }
}

.brand-font {
  font-family: 'AirConditionerCustom', cursive; /* Usa il nome che abbiamo definito sopra */
  font-size: 42px; 
  line-height: 1;
  color: var(--verde);
}

/* Input Quantità - Pulito, senza sfondo, testo nero */
.qty-input {
  /* Dimensioni */
  width: 40px !important;
  height: 32px !important;
  
  /* Allineamento */
  text-align: center !important;
  vertical-align: middle !important;
  
  /* Stile Testo */
  font-weight: bold !important;
  font-size: 16px !important; 
  
  /* COLORI */
  background-color: transparent !important; /* SFONDO TRASPARENTE (tolto il grigio) */
  color: #000000 !important;               /* TESTO NERO (per leggibilità) */
  -webkit-text-fill-color: #000000 !important; /* Fix specifico per iPhone/Safari */
  
  /* Bordo */
  border: 1px solid #ccc !important;       /* Bordo chiaro per delimitare il campo */
  border-radius: 4px !important;
  
  /* Spaziatura */
  margin: 0 4px !important;
  padding: 0 !important;
  
  /* Rimuovi frecce */
  -moz-appearance: textfield !important;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Quando clicchi sopra, diventa bianco pulito con bordo verde */
.qty-input:focus {
  background-color: #ffffff !important;
  border: 2px solid var(--verde) !important;
  outline: none !important;
}