/* Tickets — backoffice: stile (nessun framework, nessuna risorsa esterna). */

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #202124;
	background: #f5f5f7;
}

a {
	color: #1a73e8;
}

.container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 20px 40px;
}

/* ----- Barra superiore ----- */
.topbar {
	background: #fff;
	border-bottom: 1px solid #e0e0e0;
	margin-bottom: 24px;
}

.topbar-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.topbar h1 {
	margin: 0;
	font-size: 18px;
}

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

/* ----- Card ----- */
.card {
	background: #fff;
	border: 1px solid #e8e8ec;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
	padding: 20px;
	margin-bottom: 20px;
}

/* ----- Contatori stato ----- */
.counters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 16px;
}

.counters .badge {
	font-size: 13px;
	padding: 6px 14px;
}

/* ----- Badge stato ----- */
.badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.badge-new {
	background: #1a73e8;
}

.badge-open {
	background: #e8710a;
}

.badge-closed {
	background: #5f6368;
}

/* ----- Pulsanti ----- */
.btn {
	display: inline-block;
	background: #1a73e8;
	color: #fff;
	border: 1px solid #1a73e8;
	border-radius: 6px;
	padding: 8px 16px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.btn:hover {
	background: #1765cc;
}

.btn-sec {
	background: #fff;
	color: #1a73e8;
}

.btn-sec:hover {
	background: #f0f5ff;
}

.btn-block {
	width: 100%;
}

/* ----- Form ----- */
label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: #3c4043;
}

select,
input[type="text"],
input[type="password"] {
	border: 1px solid #dadce0;
	border-radius: 6px;
	padding: 8px 10px;
	font: inherit;
	background: #fff;
	color: inherit;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.filterbar {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px 20px;
}

.filterbar label {
	margin: 0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/* ----- Tabella ----- */
table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	text-align: left;
	padding: 10px 12px;
	border-bottom: 1px solid #eef0f3;
	vertical-align: top;
}

th {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #5f6368;
	border-bottom: 2px solid #e0e0e0;
	white-space: nowrap;
}

tbody tr:nth-child(even) {
	background: #fafafa;
}

tbody tr:hover {
	background: #eef3fd;
}

.tid {
	font-weight: 700;
	text-decoration: none;
}

.cell-page,
.cell-page a {
	word-break: break-all;
}

.cell-num,
.cell-ico,
.cell-date {
	white-space: nowrap;
}

.ico-ok {
	color: #188038;
}

.ico-no {
	color: #d93025;
}

.empty {
	text-align: center;
	color: #5f6368;
	padding: 24px;
}

/* ----- Paginazione ----- */
.pager {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}

.pager-info {
	color: #5f6368;
}

.pager-links {
	display: flex;
	gap: 8px;
}

/* ----- Login ----- */
.login-body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.login-card {
	background: #fff;
	border: 1px solid #e8e8ec;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
	padding: 32px;
	width: 100%;
	max-width: 360px;
}

.login-card h1 {
	margin: 0 0 2px;
	font-size: 22px;
}

.login-sub {
	margin: 0 0 18px;
	color: #5f6368;
}

.login-card label {
	margin-top: 12px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
	width: 100%;
}

.login-card .btn {
	margin-top: 20px;
}

/* ----- Avvisi ----- */
.alert {
	border-radius: 8px;
	padding: 10px 14px;
	margin: 0 0 16px;
}

.alert-error {
	background: #fdeded;
	color: #b3261e;
	border: 1px solid #f6c8c5;
}

.alert-ok {
	background: #e6f4ea;
	color: #137333;
	border: 1px solid #ceead6;
}

/* ----- Dettaglio segnalazione ----- */
.ticket-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 16px;
}

.dates {
	color: #5f6368;
	font-size: 13px;
}

.section-title {
	font-size: 13px;
	margin: 18px 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #3c4043;
}

.card > .section-title:first-child {
	margin-top: 0;
}

.info-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px 24px;
	margin: 0;
}

.info-grid dt {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #5f6368;
	margin-bottom: 2px;
}

.info-grid dd {
	margin: 0;
	word-break: break-word;
}

.span2 {
	grid-column: span 2;
}

.breakall {
	word-break: break-all;
}

.message {
	border-left: 4px solid #1a73e8;
	background: #f8f9fe;
	border-radius: 0 8px 8px 0;
	padding: 12px 16px;
	word-break: break-word;
}

/* ----- Allegati ----- */
.attachments {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.attachment {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	border: 1px solid #eef0f3;
	border-radius: 8px;
	padding: 10px 14px;
}

.attachment audio {
	flex: 1 1 260px;
	min-width: 220px;
	height: 40px;
}

.att-ico {
	font-size: 18px;
}

.att-name {
	font-weight: 600;
	word-break: break-all;
}

.att-size {
	color: #5f6368;
	white-space: nowrap;
}

.att-download {
	margin-left: auto;
}

/* ----- Form cambio stato ----- */
.status-form {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
}

.radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	margin: 0;
}

.radio input {
	accent-color: #1a73e8;
}
