/* ============================================================
   G-pop Artist Dashboard - Frontend restyle v1.0.18
   Stesse classi del markup PHP: nessuna modifica strutturale.
   ============================================================ */

.gpop-ad-wrap {
	--gpop-ink: #16171b;
	--gpop-ink-soft: #5b5e66;
	--gpop-line: #e6e7ea;
	--gpop-bg: #ffffff;
	--gpop-bg-soft: #f7f7f8;
	--gpop-accent: #111111;
	--gpop-radius: 14px;
	--gpop-radius-sm: 10px;
	--gpop-shadow: 0 1px 2px rgba(16, 17, 20, .05), 0 8px 24px -18px rgba(16, 17, 20, .28);
	--gpop-shadow-hover: 0 2px 4px rgba(16, 17, 20, .06), 0 14px 34px -18px rgba(16, 17, 20, .35);

	max-width: 1180px;
	margin: 0 auto;
	padding: 4px;
	font-family: inherit;
	color: var(--gpop-ink);
	-webkit-font-smoothing: antialiased;
}

.gpop-ad-wrap *,
.gpop-ad-wrap *::before,
.gpop-ad-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Header ---------- */

.gpop-ad-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 20px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--gpop-line);
}

.gpop-ad-head h2 {
	margin: 6px 0 0;
	font-size: clamp(24px, 4.5vw, 32px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -.015em;
	color: var(--gpop-ink);
}

.gpop-ad-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--gpop-ink-soft);
}

.gpop-ad-label::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

/* ---------- Tabs ---------- */

.gpop-ad-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0 0 24px;
	padding: 5px;
	background: var(--gpop-bg-soft);
	border: 1px solid var(--gpop-line);
	border-radius: 999px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.gpop-ad-tabs::-webkit-scrollbar {
	display: none;
}

.gpop-ad-tabs a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 9px 16px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--gpop-ink-soft);
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}

.gpop-ad-tabs a:hover {
	color: var(--gpop-ink);
	background: rgba(17, 17, 17, .06);
}

.gpop-ad-tabs a.active {
	background: var(--gpop-accent);
	color: #fff;
	box-shadow: 0 4px 12px -4px rgba(17, 17, 17, .45);
}

/* ---------- Stats ---------- */

.gpop-ad-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
}

.gpop-ad-stats > div,
.gpop-ad-box {
	position: relative;
	background: var(--gpop-bg);
	border: 1px solid var(--gpop-line);
	border-radius: var(--gpop-radius);
	padding: 20px;
	box-shadow: var(--gpop-shadow);
}

.gpop-ad-stats > div {
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}

.gpop-ad-stats > div::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, #111 0%, #4b4d55 100%);
	opacity: .9;
}

.gpop-ad-stats > div:hover {
	transform: translateY(-2px);
	box-shadow: var(--gpop-shadow-hover);
}

.gpop-ad-stats strong {
	display: block;
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.02em;
	margin-bottom: 8px;
	color: var(--gpop-ink);
}

.gpop-ad-stats span {
	font-size: 11px;
	font-weight: 700;
	color: var(--gpop-ink-soft);
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* ---------- Layout a due colonne ---------- */

.gpop-ad-two {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
	gap: 24px;
	align-items: start;
}

.gpop-ad-two h3,
.gpop-ad-wrap h3 {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -.01em;
}

/* ---------- Form ---------- */

.gpop-ad-form {
	display: grid;
	gap: 12px;
	background: var(--gpop-bg);
	border: 1px solid var(--gpop-line);
	border-radius: var(--gpop-radius);
	padding: 22px;
	box-shadow: var(--gpop-shadow);
}

.gpop-ad-form.gpop-ad-compact {
	max-width: 520px;
	margin-bottom: 20px;
}

.gpop-ad-form label {
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--gpop-ink-soft);
	margin-bottom: -4px;
}

.gpop-ad-form input:not([type="checkbox"]):not([type="radio"]),
.gpop-ad-form select,
.gpop-ad-form textarea,
.gpop-ad-inline-form input:not([type="checkbox"]):not([type="radio"]),
.gpop-ad-inline-form select,
.gpop-ad-product-field textarea {
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
	border: 1px solid #d8d9dd !important;
	border-radius: var(--gpop-radius-sm) !important;
	padding: 10px 14px !important;
	font: inherit !important;
	font-size: 14px !important;
	color: var(--gpop-ink) !important;
	background: var(--gpop-bg) !important;
	box-shadow: none !important;
	outline: none !important;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.gpop-ad-form textarea,
.gpop-ad-product-field textarea {
	min-height: 96px;
	resize: vertical;
}

.gpop-ad-form input:focus,
.gpop-ad-form select:focus,
.gpop-ad-form textarea:focus,
.gpop-ad-inline-form input:focus,
.gpop-ad-inline-form select:focus,
.gpop-ad-product-field textarea:focus {
	border-color: var(--gpop-accent) !important;
	box-shadow: 0 0 0 3px rgba(17, 17, 17, .10) !important;
}

.gpop-ad-form input::placeholder,
.gpop-ad-inline-form input::placeholder {
	color: #9a9da5;
}

.gpop-ad-form input[type="file"] {
	display: block;
	max-width: 100%;
	margin: 0;
	padding: 10px 14px !important;
	background: var(--gpop-bg-soft) !important;
	border-style: dashed !important;
	cursor: pointer;
	line-height: 1.4;
}

.gpop-ad-form input[type="file"]::file-selector-button {
	border: 0;
	border-radius: 8px;
	padding: 7px 12px;
	margin: 0 14px 0 0;
	background: var(--gpop-accent);
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	cursor: pointer;
}

/* ---------- Bottoni ---------- */

.gpop-ad-form button,
.gpop-ad-inline-form button {
	min-height: 46px;
	border: 0 !important;
	border-radius: var(--gpop-radius-sm) !important;
	padding: 10px 18px !important;
	background: var(--gpop-accent) !important;
	color: #fff !important;
	font-weight: 800 !important;
	font-size: 14px;
	letter-spacing: .01em;
	cursor: pointer;
	box-shadow: 0 6px 16px -8px rgba(17, 17, 17, .55);
	transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

.gpop-ad-form button:hover,
.gpop-ad-inline-form button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 20px -8px rgba(17, 17, 17, .55);
	opacity: .94;
}

.gpop-ad-form button:active,
.gpop-ad-inline-form button:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px -6px rgba(17, 17, 17, .5);
}

.gpop-ad-add-variation,
.gpop-ad-add-position {
	min-height: 36px !important;
	padding: 7px 12px !important;
	font-size: 12px !important;
	background: var(--gpop-bg) !important;
	color: var(--gpop-ink) !important;
	border: 1px solid #d8d9dd !important;
	box-shadow: none !important;
}

.gpop-ad-add-variation:hover,
.gpop-ad-add-position:hover {
	border-color: var(--gpop-accent) !important;
	transform: none;
	box-shadow: none !important;
}

.gpop-ad-remove-variation,
.gpop-ad-remove-position {
	min-height: 44px !important;
	padding: 0 !important;
	background: var(--gpop-bg-soft) !important;
	color: var(--gpop-ink) !important;
	border: 1px solid #d8d9dd !important;
	border-radius: var(--gpop-radius-sm) !important;
	font-size: 15px;
	box-shadow: none !important;
}

.gpop-ad-remove-variation:hover,
.gpop-ad-remove-position:hover {
	background: #fde8e8 !important;
	border-color: #f3b4b4 !important;
	color: #b42318 !important;
	transform: none;
}

/* ---------- Scheda prodotto / preventivo ---------- */

.gpop-product-artist {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 8px 12px;
	border: 1px solid #e6e7ea;
	border-radius: 999px;
	background: #fff;
	color: #16171b;
	font-size: 14px;
	line-height: 1.2;
}

.gpop-product-artist img {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.gpop-ad-quote-form {
	--gpop-ink: #16171b;
	--gpop-ink-soft: #5b5e66;
	--gpop-line: #e6e7ea;
	--gpop-bg: #ffffff;
	--gpop-bg-soft: #f7f7f8;
	--gpop-accent: #111111;
	--gpop-radius: 14px;
	--gpop-radius-sm: 10px;
	--gpop-shadow: 0 1px 2px rgba(16, 17, 20, .05), 0 8px 24px -18px rgba(16, 17, 20, .28);
	margin-top: 18px;
	margin-bottom: 42px;
	max-width: 620px;
}

/* ---------- Varianti / posizioni ---------- */

.gpop-ad-variants,
.gpop-ad-positions,
.gpop-ad-variant-list,
.gpop-ad-position-list {
	display: grid;
	gap: 8px;
}

.gpop-ad-variant-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.gpop-ad-variation-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 110px 90px 44px;
	gap: 8px;
	align-items: center;
}

.gpop-ad-position-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 44px;
	gap: 8px;
	align-items: center;
}

.gpop-ad-variation-row input,
.gpop-ad-position-row input {
	min-width: 0;
}

/* ---------- Campi prodotto ---------- */

.gpop-ad-product-custom-fields {
	margin: 16px 0;
	display: grid;
	gap: 16px;
}

.gpop-ad-product-label {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--gpop-ink-soft);
}

.gpop-ad-select-wrap,
.gpop-ad-select-wrap select {
	width: 100%;
}

.gpop-ad-help {
	margin: 0;
	font-size: 12.5px;
	color: var(--gpop-ink-soft);
	line-height: 1.5;
}

/* ---------- Tabelle ---------- */

.gpop-ad-table-wrap {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--gpop-line);
	border-radius: var(--gpop-radius);
	background: var(--gpop-bg);
	box-shadow: var(--gpop-shadow);
}

.gpop-ad-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 680px;
	margin: 0 !important;
}

.gpop-ad-table th,
.gpop-ad-table td {
	padding: 13px 16px;
	border: 0;
	border-bottom: 1px solid #eef0f2;
	text-align: left;
	vertical-align: middle;
	font-size: 13.5px;
	line-height: 1.45;
}

.gpop-ad-table thead th {
	position: sticky;
	top: 0;
	background: var(--gpop-bg-soft);
	font-size: 10.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--gpop-ink-soft);
	white-space: nowrap;
	z-index: 1;
}

.gpop-ad-table tbody tr {
	transition: background .12s ease;
}

.gpop-ad-table tbody tr:hover {
	background: #fafafb;
}

.gpop-ad-table tbody tr:last-child td {
	border-bottom: 0;
}

.gpop-ad-table td a {
	color: var(--gpop-ink);
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: #c9cbd1;
}

.gpop-ad-table td a:hover {
	text-decoration-color: var(--gpop-ink);
}

.gpop-ad-table select {
	min-height: 38px;
	border: 1px solid #d8d9dd !important;
	border-radius: 8px !important;
	padding: 6px 10px !important;
	font-size: 13px !important;
	background: var(--gpop-bg) !important;
}

.gpop-ad-table button {
	min-height: 38px;
	border: 0 !important;
	border-radius: 8px !important;
	padding: 7px 14px !important;
	background: var(--gpop-accent) !important;
	color: #fff !important;
	font-weight: 700 !important;
	font-size: 12.5px;
	cursor: pointer;
}

/* ---------- Badge di stato (iniettati via JS) ---------- */

.gpop-ad-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .02em;
	white-space: nowrap;
	background: #eef0f2;
	color: #3f424a;
	border: 1px solid #e2e4e8;
}

.gpop-ad-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.gpop-ad-badge--ok {
	background: #ecfdf3;
	color: #067647;
	border-color: #abefc6;
}

.gpop-ad-badge--warn {
	background: #fffaeb;
	color: #b54708;
	border-color: #fedf89;
}

.gpop-ad-badge--err {
	background: #fef3f2;
	color: #b42318;
	border-color: #fecdca;
}

.gpop-ad-badge--info {
	background: #eff8ff;
	color: #175cd3;
	border-color: #b2ddff;
}

/* ---------- Notice / empty ---------- */

.gpop-ad-empty,
.gpop-ad-notice {
	padding: 16px 18px;
	border: 1px solid var(--gpop-line);
	border-radius: var(--gpop-radius);
	background: var(--gpop-bg);
	color: var(--gpop-ink-soft);
	font-size: 14px;
	line-height: 1.5;
	box-shadow: var(--gpop-shadow);
}

.gpop-ad-empty {
	text-align: center;
	background: var(--gpop-bg-soft);
	box-shadow: none;
	border-style: dashed;
}

.gpop-ad-ok {
	border-color: #abefc6;
	background: #ecfdf3;
	color: #067647;
	font-weight: 600;
	margin-bottom: 16px;
	box-shadow: none;
}

/* ---------- Inline form (coupon ecc.) ---------- */

.gpop-ad-inline-form {
	display: grid;
	grid-template-columns: minmax(160px, 1fr) minmax(120px, .7fr) minmax(140px, .9fr) minmax(120px, .8fr) auto;
	gap: 8px;
	align-items: center;
}

.gpop-ad-list {
	margin: 0;
	padding-left: 18px;
	line-height: 1.7;
}

/* ---------- Checkbox ---------- */

.gpop-ad-checks {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 8px 14px;
	margin: 6px 0 10px;
}

.gpop-ad-checks label {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 14px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	color: var(--gpop-ink);
	padding: 9px 12px;
	border: 1px solid var(--gpop-line);
	border-radius: var(--gpop-radius-sm);
	background: var(--gpop-bg);
	cursor: pointer;
	transition: border-color .12s ease, background .12s ease;
}

.gpop-ad-checks label:hover {
	border-color: #c3c5cb;
}

.gpop-ad-checks label:has(input:checked) {
	border-color: var(--gpop-accent);
	background: var(--gpop-bg-soft);
}

.gpop-ad-checks input[type="checkbox"] {
	width: 17px;
	height: 17px;
	min-height: 0;
	flex-shrink: 0;
	margin: 0;
	accent-color: var(--gpop-accent);
	cursor: pointer;
}

/* ---------- Filtri shop ---------- */

.gpop-ad-shop-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 24px;
	padding: 14px 16px;
	background: #111;
	border-radius: var(--gpop-radius);
	box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .6);
}

.gpop-ad-shop-filters select,
.gpop-ad-shop-filters button,
.gpop-ad-shop-filters a {
	min-height: 42px;
	border-radius: var(--gpop-radius-sm);
	font-size: 14px;
}

.gpop-ad-shop-filters select {
	flex: 1 1 180px;
	min-width: 160px;
	border: 1px solid #333 !important;
	background: #fff !important;
	color: #111 !important;
	padding: 0 12px !important;
}

.gpop-ad-shop-filters button {
	border: 0 !important;
	background: #fff !important;
	color: #111 !important;
	padding: 0 20px !important;
	font-weight: 800 !important;
	cursor: pointer;
	transition: opacity .12s ease;
}

.gpop-ad-shop-filters button:hover {
	opacity: .88;
}

.gpop-ad-shop-filters a {
	display: inline-flex;
	align-items: center;
	color: #fff !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	padding: 0 8px;
	opacity: .85;
}

.gpop-ad-shop-filters a:hover {
	opacity: 1;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1024px) {
	.gpop-ad-two {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 900px) {
	.gpop-ad-inline-form {
		grid-template-columns: 1fr 1fr;
	}

	.gpop-ad-inline-form button {
		grid-column: 1 / -1;
	}

	.gpop-ad-variation-row {
		grid-template-columns: 1fr 1fr;
	}

	.gpop-ad-variation-row .gpop-ad-remove-variation {
		grid-column: 1 / -1;
	}
}

@media (max-width: 768px) {
	.gpop-ad-wrap {
		padding: 2px;
	}

	.gpop-ad-form,
	.gpop-ad-box {
		padding: 18px 16px;
	}

	.gpop-ad-form.gpop-ad-compact {
		max-width: none;
	}

	/* Tabelle -> card impilate (richiede data-label iniettati dal JS) */
	.gpop-ad-table {
		min-width: 0;
	}

	.gpop-ad-table thead {
		display: none;
	}

	.gpop-ad-table,
	.gpop-ad-table tbody,
	.gpop-ad-table tr,
	.gpop-ad-table td {
		display: block;
		width: 100%;
	}

	.gpop-ad-table tbody tr {
		padding: 6px 0;
		border-bottom: 1px solid var(--gpop-line);
	}

	.gpop-ad-table tbody tr:last-child {
		border-bottom: 0;
	}

	.gpop-ad-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		border-bottom: 0;
		padding: 8px 16px;
		font-size: 14px;
		text-align: right;
	}

	.gpop-ad-table td::before {
		content: attr(data-label);
		font-size: 10.5px;
		font-weight: 800;
		text-transform: uppercase;
		letter-spacing: .08em;
		color: var(--gpop-ink-soft);
		text-align: left;
		flex-shrink: 0;
	}

	.gpop-ad-table td:not([data-label])::before {
		content: none;
	}

	.gpop-ad-table td form {
		margin-left: auto;
	}
}

@media (max-width: 560px) {
	.gpop-ad-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}

	.gpop-ad-stats > div {
		padding: 16px 14px;
	}

	.gpop-ad-inline-form,
	.gpop-ad-variation-row {
		grid-template-columns: 1fr;
	}

	.gpop-ad-inline-form button {
		width: 100%;
	}

	.gpop-ad-shop-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.gpop-ad-shop-filters select,
	.gpop-ad-shop-filters button,
	.gpop-ad-shop-filters a {
		width: 100%;
		justify-content: center;
	}

	.gpop-ad-tabs a {
		padding: 9px 13px;
		font-size: 12.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gpop-ad-wrap *,
	.gpop-ad-wrap *::before,
	.gpop-ad-wrap *::after {
		transition: none !important;
		transform: none !important;
	}
}
