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

body {
	font-family: "Inter", sans-serif;
	background: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8);
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.login-container {
	background: white;
	width: 100%;
	max-width: 380px;
	padding: 40px 32px;
	border-radius: 18px;
	box-shadow: 0 10px 35px rgba(0,0,0,0.15);
	animation: fadeIn 0.6s ease-out;
}

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

h2 {
	text-align: center;
	font-weight: 700;
	margin-bottom: 25px;
	color: #1f1f1f;
}

.input-group {
	margin-bottom: 18px;
}

label {
	font-size: 14px;
	margin-bottom: 6px;
	display: block;
	color: #333;
	font-weight: 500;
}

input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 10px;
	border: 1px solid #d4d4d4;
	font-size: 15px;
	transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
	outline: none;
}

button {
	width: 100%;
	padding: 13px;
	background: #4f46e5;
	border: none;
	color: white;
	font-size: 16px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	transition: 0.2s ease;
}

button:hover {
	background: #3730a3;
}

.note {
	margin-top: 20px;
	text-align: center;
	font-size: 13px;
	color: #666;
}

.logoForm{
width:200px;
margin-bottom:20px;	
}


.auth-app-info {
	margin-top: 25px;
	padding: 15px;
	background: #f8f9fc;
	border-radius: 10px;
	font-size: 14px;
	color: #333;
}

.auth-app-info h3 {
	margin-top: 0;
	font-size: 16px;
}

.auth-links {
	margin-top: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.auth-link {
	color: #0b63d1;
	text-decoration: none;
	font-weight: bold;
}

.auth-link:hover {
	text-decoration: underline;
}

.store-links {
	margin-top: 20px;
	text-align: center;
}
.store-links p {
	font-size: 14px;
	margin-bottom: 10px;
}
.store-buttons{
	display: flex;
	}
.store-buttons img {
	height: 45px;
	margin: 5px;
}    
.store-buttons a{
	text-decoration:none;
	}    
	
/* Migliora la leggibilità su schermi piccoli */
@media (max-width: 500px) {
    .login-container {
        padding: 20px 16px; /* meno padding sui lati */
        width: 95%;         /* quasi tutta la larghezza dello schermo */
        max-width: none;    /* ignora max-width fisso */
    }

    input, button {
        font-size: 1rem;    /* un po’ più grande per tocco facile */
        padding: 12px;
    }

    .logoForm {
        width: 150px;       /* più proporzionata a mobile */
        margin-bottom: 15px;
    }

    p {
        font-size: 14px;    /* leggermente più grande del default */
    }
}
/* -----------------------------------------------------
   RESET + BASE
------------------------------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

/* -----------------------------------------------------
   LAYOUT
------------------------------------------------------ */
.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.searchbar {
    display: flex;
    align-items: start;
    gap: 10px;
}

#btnNew.btn-new {
 padding: 6px 14px;
background: #4CAF50;
color: white;
border: none;
border-radius: 8px;
font-size: 15px;
cursor: pointer;
width: 120px;
}

#btnNew.btn-new:hover {
    background: #43A047;
}


#searchInput {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* -----------------------------------------------------
   SIDEBAR
------------------------------------------------------ */
.sidebar {
    width: 260px;
	background: linear-gradient(to bottom right, #9d9d9d, #b2b2b2, #505050);
    color: #fff;
    padding: 20px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 1px solid #eeeeee77;
	padding-bottom: 10px;
	}

.sidebar nav ul {
    list-style: none;
}

.sidebar nav li {
    padding: 10px 0;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
    display: flex;
	align-items: center;
}
.sidebar nav li span{
    margin-right:10px;
}


.sidebar nav li:hover {
    opacity: 1;
}

.sidebar nav li.active {
    opacity: 1;
    font-weight: 600;
}

.sidebar .lang {
    margin-top: auto;
    opacity: 0.7;
    font-size: 14px;
}
.sidebar .logout {
	margin-top: auto;
    opacity: 0.7;
	font-size: 14px;
	display: flex;
	align-items: center;
	}
.sidebar .logout a{
	text-decoration: none;
	color: #fff;
	}
/* -----------------------------------------------------
   MAIN
------------------------------------------------------ */
.main {
    margin-left: 260px;
    padding: 20px;
    width: calc(100% - 260px);
    height: 100vh;             /* ← IMPORTANTE */
    overflow-y: auto;          /* ← SCROLL DELLA COLONNA A DESTRA */
}


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

#hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

header h2 {
	margin-bottom: 0px;
	}

/* -----------------------------------------------------
   MOBILE
------------------------------------------------------ */
@media (max-width: 820px) {
    .sidebar {
        transform: translateX(-300px);
        transition: 0.3s;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    #hamburger {
        display: block;
    }
    .main {
        margin-left: 0;
        width: 100%;
        height: 100vh;
        overflow-y: auto;
    }
}


/* -----------------------------------------------------
   GRID PRODOTTI
------------------------------------------------------ */
.productsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-3px);
}

.product-card img {
    width: 100%;
    height: 130px;
    object-fit: contain;
    margin-bottom: 10px;
}


.clientsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
}

.client-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: transform .1s;
}

.client-card:hover {
    transform: scale(1.02);
}

.inactive-badge {
    display: inline-block;
    margin-top: 8px;
    background: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
}


/* ============================================
   DETAIL OVERLAY – VERSIONE PULITA E CORRETTA
   ============================================ */

/* sfondo oscurato */
#detailoverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;           /* hidden by default */
    justify-content: center;
    align-items: center;
    padding: 15px;
}

/* box centrale */
#detailbox {
    background: #ffffff;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    border-radius: 16px;
    padding: 25px;
    overflow-y: auto;
    margin: auto;
    position: relative;
    animation: fadeInUp 0.25s ease-out;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

/* animazione */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* pulsante chiudi */
#detailbox .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: #f2f2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: 0.2s;
    user-select: none;
}

#detailbox .close-btn:hover {
    background: #e2e2e2;
    transform: scale(1.12);
}

/* layout interno */
.detail-columns {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.detail-col {
    flex: 1;
    min-width: 230px;
}

/* preview immagine */
.detail-image {
    width: 100%;
    border-radius: 12px;
    object-fit: contain;
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 8px;
}

/* inputs uniformi */
#detailbox label {
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 4px;
    display: block;
    font-size: 14px;
}

#detailbox input,
#detailbox textarea,
#detailbox select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 8px;
    font-size: 15px;
    margin-bottom: 10px;
}
#detailbox select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 42px; /* forza la stessa altezza degli input */
    background-position: right 10px center;
    background-repeat: no-repeat;
}

/* pulsanti */
.save-btn,
.delete-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    margin-top: 18px;
}

#loadMoreBtn button:hover {
    background:#3730a3;
}


.save-btn {
    background: #3a7afe;
    color: white;
}
.save-btn:hover {
    background: #2f65dd;
}

.delete-btn {
    background: #e04646;
    color: white;
}
.delete-btn:hover {
    background: #c53636;
}

/* mobile fix */
@media (max-width: 600px) {
    #detailbox {
        padding: 18px;
        border-radius: 12px;
    }
}


/* upload image */
.img-preview img {
    width: 100%;
    max-width: 260px;
    border-radius: 12px;
}
.upload-btn {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 8px;
    background: #eee;
    cursor: pointer;
}
.upload-btn:hover { background: #ddd; }
    

.categoriesContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.category-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    font-size: 34px;
    color: #4f46e5;
    margin-bottom: 5px;
}

#iconsLightbox {
    position: fixed;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.45);
    display:none;
    z-index:99999;
    backdrop-filter: blur(2px);
    justify-content:center;
    align-items:center;
}

#iconsBox {
    background:white;
    width:90%; max-width:800px;
    max-height:90%;
    overflow-y:auto;
    padding:20px;
    border-radius:15px;
    position:relative;
    animation: fadeInUp .2s ease;
}

#iconsClose {
    position:absolute;
    top:12px; right:12px;
    background:#eee;
    width:32px; height:32px;
    display:flex; align-items:center; justify-content:center;
    border-radius:50%;
    cursor:pointer;
    font-size:18px;
}
#iconsClose:hover { background:#ddd; }

#iconsGrid {
    margin-top:20px;
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(80px,1fr));
    gap:15px;
}

.iconItem {
    text-align:center;
    padding:10px;
    border-radius:10px;
    cursor:pointer;
    transition:0.2s;
    border:1px solid #ddd;
    overflow: hidden;
}

.iconItem:hover {
    background:#f0f0f0;
    transform: translateY(-2px);
}

.iconItem span {
    font-size:32px;
    color:#4f46e5;
}
#iconsSearch {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-bottom: 15px;
    position: sticky;
	top: 12px;
	z-index: 2;
}
    
      
/*_____________________________________________LOADER______________________________________________*/      
#fullLoader {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.85);
    display: none;
    z-index: 9999;

    backdrop-filter: blur(4px);

    justify-content: center;
    align-items: center;
}
.loader {
  position: absolute;
  top: calc(50% - 32px);
  left: calc(50% - 32px);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  perspective: 800px;
}

.inner {
  position: absolute;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  border-radius: 50%;  
}

.inner.one {
  left: 0%;
  top: 0%;
  animation: rotate-one 1s linear infinite;
  border-bottom: 3px solid #3ca148;
}

.inner.two {
  right: 0%;
  top: 0%;
  animation: rotate-two 1s linear infinite;
  border-right: 3px solid #00ff4d;
}

.inner.three {
  right: 0%;
  bottom: 0%;
  animation: rotate-three 1s linear infinite;
  border-top: 3px solid #095900;
}

@keyframes rotate-one {
  0% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg);
  }
}

@keyframes rotate-two {
  0% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg);
  }
}

@keyframes rotate-three {
  0% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg);
  }
}


        
        
        