/* A360 – Azioni rapide anagrafiche (stessa palette del gestionale WP ERP Open Cloud) */
.a360aa-menu, .a360aa-btn, .a360aa-toast {
	--aa-sheet: #fbfcfa; --aa-ink: #1d2622; --aa-ink-2: #56635c; --aa-ink-3: #7d8a83;
	--aa-rule: #b9c8bd; --aa-rule-soft: #d8e2da; --aa-carbon: #23408e; --aa-carbon-soft: #e3e9f6;
	--aa-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Colonna e pulsante nella tabella */
.erp-table th.a360aa-th { width: 1%; white-space: nowrap; text-align: right; }
.erp-table td.a360aa-td { width: 1%; white-space: nowrap; text-align: right; padding-top: 4px; padding-bottom: 4px; cursor: default; }
.a360aa-btn, body .erp-table .a360aa-btn {
	display: inline-flex; margin: 0; min-height: 0; text-transform: none; letter-spacing: normal; box-shadow: none; text-decoration: none; align-items: center; gap: 6px;
	font: 500 13px/1 var(--aa-sans); color: var(--aa-carbon);
	background: var(--aa-sheet); border: 1px solid var(--aa-rule); border-radius: 6px;
	padding: 7px 10px; cursor: pointer; transition: background .15s, border-color .15s;
}
.a360aa-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.a360aa-btn:hover, .a360aa-btn:focus, .a360aa-btn[aria-expanded="true"],
body .erp-table .a360aa-btn:hover, body .erp-table .a360aa-btn:focus, body .erp-table .a360aa-btn[aria-expanded="true"] { color: var(--aa-carbon); }
.a360aa-btn:hover, .a360aa-btn[aria-expanded="true"] { background: var(--aa-carbon-soft); border-color: var(--aa-carbon); }
.a360aa-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(35, 64, 142, .32); }
@media (max-width: 640px) {
	.a360aa-btn span { display: none; }
	.a360aa-btn { padding: 7px; }
	.erp-table th.a360aa-th { font-size: 0; }
}

/* Menu a tendina */
.a360aa-menu {
	position: fixed; z-index: 100000; width: 290px; max-height: calc(100vh - 16px); overflow-y: auto;
	background: var(--aa-sheet); color: var(--aa-ink); font: 14px/1.35 var(--aa-sans);
	border: 1px solid var(--aa-rule); border-radius: 8px; padding: 6px;
	box-shadow: 0 12px 32px rgba(29, 38, 34, .18), 0 2px 6px rgba(29, 38, 34, .08);
	animation: a360aa-in .12s ease-out;
}
@keyframes a360aa-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.a360aa-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--aa-rule-soft); margin-bottom: 4px; }
.a360aa-head strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a360aa-head span { font-size: 12px; color: var(--aa-ink-3); }
.a360aa-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--aa-ink-3); padding: 10px 10px 4px; }
.a360aa-item, body .a360aa-menu .a360aa-item {
	min-height: 0; font-size: 14px; line-height: 1.35; font-weight: 400; text-transform: none; letter-spacing: normal; box-shadow: none; text-decoration: none;
	display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
	background: none; border: 0; border-radius: 6px; padding: 7px 10px; margin: 0;
	font-family: var(--aa-sans); color: var(--aa-ink); cursor: pointer;
}
.a360aa-item svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: var(--aa-ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.a360aa-l { display: flex; flex-direction: column; min-width: 0; }
.a360aa-l > span { font-size: 14px; line-height: 1.3; }
.a360aa-l small { font-size: 12px; color: var(--aa-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .a360aa-menu .a360aa-item:hover, body .a360aa-menu .a360aa-item:focus { background: var(--aa-carbon-soft); color: var(--aa-ink); outline: none; border: 0; }
body .a360aa-menu .a360aa-item.is-primary, body .a360aa-menu .a360aa-item.is-primary:hover, body .a360aa-menu .a360aa-item.is-primary:focus { color: var(--aa-carbon); font-weight: 600; }
.a360aa-item.is-primary svg { stroke: var(--aa-carbon); }
body .a360aa-menu .a360aa-item[disabled], body .a360aa-menu .a360aa-item[disabled]:hover { opacity: .45; cursor: not-allowed; background: transparent; color: var(--aa-ink); }

/* Protezione dagli stili globali dei pulsanti (CSS aggiuntivo del tema con !important) */
html:root body .a360aa-menu button.a360aa-item.a360aa-item {
	border: 0 !important; box-shadow: none !important; font-weight: 400 !important; outline: none !important;
	transform: none !important; background: transparent !important; font-size: 14px !important; min-height: 0 !important;
}
html:root body .a360aa-menu button.a360aa-item.a360aa-item:hover,
html:root body .a360aa-menu button.a360aa-item.a360aa-item:focus { background: var(--aa-carbon-soft) !important; box-shadow: none !important; }
html:root body .a360aa-menu button.a360aa-item.a360aa-item.is-primary { font-weight: 600 !important; }
html:root body .a360aa-menu button.a360aa-item.a360aa-item[disabled] { background: transparent !important; }
html:root body button.a360aa-btn.a360aa-btn {
	font-weight: 500 !important; font-size: 13px !important; box-shadow: none !important; transform: none !important;
	border: 1px solid var(--aa-rule) !important; outline: none !important;
}
html:root body button.a360aa-btn.a360aa-btn:hover,
html:root body button.a360aa-btn.a360aa-btn[aria-expanded="true"] { border-color: var(--aa-carbon) !important; box-shadow: none !important; }
html:root body button.a360aa-btn.a360aa-btn:focus-visible { box-shadow: 0 0 0 3px rgba(35, 64, 142, .32) !important; }

/* Avviso */
.a360aa-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 100001; transform: translate(-50%, 12px);
	background: var(--aa-ink); color: #fff; font: 14px/1.4 var(--aa-sans);
	padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s, transform .2s;
	max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.a360aa-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .a360aa-menu { animation: none; } .a360aa-toast { transition: none; } }
