/**
 * Audere Hub - sezioni My Account (Assistenza + Licenze).
 * Colori dai token --ah-* iniettati per sito, cosi' eredita il brand.
 * Superfici chiare con testo scuro esplicito: a prova di tema scuro.
 */
/* Default a bassa specificita' (:root): l'iniezione per-sito, aggiunta come
   inline-style DOPO questo file e anch'essa su :root, li sovrascrive. Un
   fallback con selettore piu' specifico vincerebbe invece sull'inline e
   ignorerebbe il brand del sito. */
:root{
	--ah-accent: #0c8f74;
	--ah-accent-ink: #0a6f59;
	--ah-on-accent: #ffffff;
}

/* SLA banner */
.ah-sla{
	display:flex; align-items:center; gap:.6rem;
	background:color-mix(in srgb, var(--ah-accent) 10%, #ffffff);
	border:1px solid color-mix(in srgb, var(--ah-accent) 28%, #ffffff);
	/* Sfondo fisso chiaro: il testo deve restare accent-ink a prescindere dal
	   tema. L'!important batte eventuali regole del tema su "p" nell'account. */
	color:var(--ah-accent-ink) !important;
	border-radius:12px; padding:.8rem 1rem; margin:0 0 1.2rem;
	font-size:.95rem; font-weight:600; line-height:1.4;
}
.ah-sla__dot{
	width:9px; height:9px; border-radius:999px; background:var(--ah-accent);
	flex:0 0 auto; box-shadow:0 0 0 4px color-mix(in srgb, var(--ah-accent) 20%, transparent);
}
.ah-sla--inline{margin:.2rem 0 1rem; font-size:.9rem;}

/* Lista ticket */
.ah-tickets{display:flex; flex-direction:column; gap:.5rem; margin:0 0 1.4rem;}
.ah-ticket{
	display:grid;
	grid-template-columns:auto minmax(0,1fr) auto auto;
	align-items:center; gap:.9rem;
	background:#fff; color:#1c2024;
	border:1px solid rgba(0,0,0,.10); border-radius:12px;
	padding:.85rem 1rem; text-decoration:none;
	transition:border-color .12s ease, transform .12s ease, box-shadow .12s ease;
}
.ah-ticket:hover{border-color:color-mix(in srgb, var(--ah-accent) 45%, #ffffff); transform:translateY(-1px); box-shadow:0 6px 18px rgba(0,0,0,.06);}
.ah-ticket__id{font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.85rem; color:#6b7280;}
.ah-ticket__subject{font-weight:700; color:#0f1419; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.ah-ticket__date{font-size:.82rem; color:#6b7280; white-space:nowrap;}
@media(max-width:560px){
	.ah-ticket{grid-template-columns:auto minmax(0,1fr) auto;}
	.ah-ticket__date{display:none;}
}

/* Badge stato */
.ah-badge{display:inline-block; padding:3px 10px; border-radius:999px; font-size:.75rem; font-weight:700; white-space:nowrap;}
.ah-badge--open{background:#fdecea; color:#8a1c12;}
.ah-badge--answered{background:#e6f4ec; color:#0a6f4a;}
.ah-badge--closed{background:#eceff1; color:#4b5560;}

/* Empty + locked. Il testo vuoto sta sul fondo pagina (chiaro o scuro a
   seconda del tema): eredita il colore del tema invece di un grigio fisso. */
.ah-empty{color:inherit; opacity:.7; margin:0 0 1.2rem;}
.ah-panel{background:#fff; color:#1c2024; border:1px solid rgba(0,0,0,.10); border-radius:14px; padding:1.4rem 1.5rem; margin:0 0 1.2rem;}
.ah-panel h3{margin:0 0 .5rem; color:#0f1419;}
.ah-panel p{color:#41474d; margin:0 0 1rem;}

/* Bottoni */
.ah-btn{
	display:inline-block; cursor:pointer;
	border:0; border-radius:10px; font-weight:700; font-size:.95rem;
	padding:.7rem 1.3rem; text-decoration:none; line-height:1.2;
}
/* Sfondo = accent-ink (piu' scuro): garantisce AA col testo bianco anche
   quando l'accent chiaro del brand da solo non arriva a 4.5:1. */
.ah-btn--primary{background:var(--ah-accent-ink); color:var(--ah-on-accent);}
.ah-btn--primary:hover{filter:brightness(.92);}

/* Form nuovo ticket */
.ah-new{margin:0 0 1rem;}
.ah-new > summary{list-style:none; display:inline-block; margin-bottom:1rem;}
.ah-new > summary::-webkit-details-marker{display:none;}
.ah-form{display:flex; flex-direction:column; gap:.9rem; background:#fff; color:#1c2024; border:1px solid rgba(0,0,0,.10); border-radius:14px; padding:1.2rem 1.3rem;}
.ah-field{display:flex; flex-direction:column; gap:.35rem;}
.ah-field > span{font-weight:600; font-size:.85rem; color:#41474d;}
.ah-input{
	width:100%; box-sizing:border-box;
	border:1px solid rgba(0,0,0,.16); border-radius:9px;
	padding:.65rem .75rem; font-size:.95rem; color:#1c2024; background:#fff;
	font-family:inherit;
}
.ah-input:focus{outline:none; border-color:var(--ah-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--ah-accent) 22%, transparent);}
textarea.ah-input{resize:vertical; min-height:110px;}

/* Thread. Back e titolo stanno sul fondo pagina: ereditano il colore del
   tema, cosi' restano leggibili sia su chiaro sia su scuro. */
.ah-back{display:inline-block; margin:0 0 1rem; color:inherit; text-decoration:underline; font-weight:600;}
.ah-thread-head{display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0 0 1rem;}
.ah-thread-head h3{margin:0; color:inherit;}
.ah-msgs{display:flex; flex-direction:column; gap:.7rem; margin:0 0 1.2rem;}
.ah-msg{border:1px solid rgba(0,0,0,.10); border-radius:12px; padding:.85rem 1rem; background:#fff; color:#1c2024; max-width:88%;}
.ah-msg--me{align-self:flex-end; background:color-mix(in srgb, var(--ah-accent) 8%, #ffffff); border-color:color-mix(in srgb, var(--ah-accent) 26%, #ffffff);}
.ah-msg--staff{align-self:flex-start;}
.ah-msg__meta{font-size:.78rem; color:#565e68; margin-bottom:.35rem;}
.ah-msg__meta b{color:#0f1419;}
.ah-msg__body{line-height:1.55; color:#1c2024;}
.ah-reply{margin-top:.5rem;}

/* Licenze */
.ah-licenses{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1rem;}
.ah-license{background:#fff; color:#1c2024; border:1px solid rgba(0,0,0,.10); border-radius:14px; padding:1.1rem 1.2rem;}
.ah-license__top{display:flex; align-items:center; justify-content:space-between; gap:.6rem; margin-bottom:.8rem;}
.ah-license__product{font-weight:700; color:#0f1419;}
.ah-license__key{display:flex; align-items:center; gap:.5rem; margin:0 0 .8rem;}
.ah-license__key code{
	flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
	background:#f6f7f9; border:1px solid rgba(0,0,0,.10); border-radius:8px;
	padding:.5rem .6rem; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.82rem; color:#1c2024;
}
.ah-copy{cursor:pointer; border:1px solid var(--ah-accent); background:#fff; color:var(--ah-accent-ink); border-radius:8px; padding:.5rem .7rem; font-weight:700; font-size:.8rem; white-space:nowrap;}
.ah-copy:hover{background:var(--ah-accent); color:var(--ah-on-accent);}
.ah-copy.is-done{background:var(--ah-accent); color:var(--ah-on-accent);}
.ah-license__meta{display:flex; flex-wrap:wrap; gap:.3rem 1.1rem; font-size:.85rem; color:#41474d;}
.ah-license__meta b{color:#0f1419;}
