/* VD AI Expert – portale utente frontend */
.ite-portal {
	max-width: 820px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	color: #1d2327;
}
.ite-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	margin-bottom: 16px;
	border-bottom: 1px solid #ddd;
	font-size: 14px;
}
.ite-portal-logout {
	color: #d63638;
	text-decoration: none;
	font-weight: 600;
}
.ite-portal-logout:hover { text-decoration: underline; }

/* Form */
.ite-portal-form { max-width: 480px; }
.ite-portal-input,
.ite-portal-textarea {
	display: block;
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 15px;
	box-sizing: border-box;
	margin-top: 4px;
}
.ite-portal-input:focus,
.ite-portal-textarea:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.25);
}
.ite-portal-btn {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 20px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	cursor: pointer;
}
.ite-portal-btn:hover { background: #135e96; }

/* Tabella ticket */
.ite-portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.ite-portal-table th {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 2px solid #ddd;
	font-weight: 600;
}
.ite-portal-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
}
.ite-portal-table tr:hover td { background: #f9f9f9; }
.ite-portal-table a { color: #2271b1; text-decoration: none; font-weight: 600; }
.ite-portal-table a:hover { text-decoration: underline; }

/* Badge stato */
.ite-portal-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}
.ite-portal-badge-open   { background: #e6f4ea; color: #1e7a34; }
.ite-portal-badge-closed { background: #f0f0f1; color: #646970; }
.ite-portal-badge-prio-low    { background: #f0f0f1; color: #646970; }
.ite-portal-badge-prio-normal { background: #e5efff; color: #2271b1; }
.ite-portal-badge-prio-high   { background: #fcf9e8; color: #7a5c00; }
.ite-portal-badge-prio-urgent { background: #fce8e8; color: #b32d2d; }

/* Thread messaggi */
.ite-portal-thread { margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }

.ite-portal-msg {
	padding: 12px 16px;
	border-radius: 6px;
	border: 1px solid #e5e5e5;
}
.ite-portal-msg-user    { background: #f0f7ff; border-color: #c3d8f0; }
.ite-portal-msg-trainer { background: #f0faf2; border-color: #b8dfc1; }
.ite-portal-msg-ai      { background: #fafaf0; border-color: #d9d9b8; }

.ite-portal-msg-head {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
	font-size: 13px;
}
.ite-portal-msg-head span { color: #8c8f94; }
.ite-portal-msg-body { font-size: 15px; line-height: 1.6; }
.ite-portal-msg-body p:last-child { margin-bottom: 0; }

/* Ticket chiuso */
.ite-portal-closed-msg {
	padding: 12px 16px;
	background: #f0f0f1;
	border-radius: 4px;
	color: #646970;
}
.ite-portal-empty {
	color: #646970;
	font-style: italic;
}

/* Allegati */
.ite-portal-att-list {
	list-style: none;
	margin: 6px 0 0 0;
	padding: 6px 10px;
	background: rgba(0,0,0,.04);
	border-radius: 4px;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
}
.ite-portal-att-list li {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
}
.ite-portal-att-link {
	color: #2271b1;
	text-decoration: none;
}
.ite-portal-att-link:hover { text-decoration: underline; }
.ite-portal-att-size { color: #8c8f94; }

/* Box "segna come risolto" */
.ite-portal-resolve-box {
	margin-top: 20px;
	padding: 14px 16px;
	background: #f0faf2;
	border: 1px solid #b8dfc1;
	border-radius: 6px;
}
.ite-portal-resolve-box p {
	margin: 0 0 10px;
	font-weight: 600;
	color: #1e7a34;
}
.ite-portal-btn-resolve {
	background: #1e7a34;
}
.ite-portal-btn-resolve:hover {
	background: #155724;
}

/* Filtri lista ticket: tab stato + ricerca */
.ite-portal-tab {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 4px;
	background: #e8eaed;
	color: #1e1e1e;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: background .15s;
}
.ite-portal-tab:hover { background: #d0d3d8; color: #1e1e1e; text-decoration: none; }
.ite-portal-tab-active { background: #2271b1; color: #fff; }
.ite-portal-tab-active:hover { background: #135e96; color: #fff; }

/* Input file nel form risposta */
.ite-portal-file-label {
	display: block;
	font-size: 14px;
	cursor: pointer;
}
.ite-portal-file-input {
	display: block;
	margin-top: 4px;
}
.ite-portal-file-hint {
	display: block;
	font-size: 12px;
	color: #8c8f94;
	margin-top: 2px;
}
