/**
 * Myco panel — component skins. Class names are the contract shared by PHP
 * (Myco_UI::*), templates and the JS files (app.js / payments.js / backups.js
 * build modals, toasts and buttons with these same classes). Existing names
 * (.myco-btn, .myco-badge, .myco-card, .myco-field, .myco-link, .myco-hint…)
 * are kept and restyled; new primitives are added beside them. Tokens only.
 *
 * Index: pill/badge · card · stat · list rows · table.
 * (buttons.css · forms.css · feedback.css · overlays.css hold the rest)
 */

/* ---- Status pills (.myco-pill) and legacy .myco-badge ---- */

.myco-pill,
.myco-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 9px;
	border-radius: var( --myco-radius-pill );
	font-family: var( --myco-font-mono );
	font-size: 11px;
	font-weight: 400;
	line-height: 1.45;
	white-space: nowrap;
	background: var( --myco-active );
	color: var( --myco-text-2 );
	vertical-align: middle;
}

.myco-pill .myco-icon {
	font-size: 12px;
}

.myco-pill--success,
.myco-badge--active,
.myco-badge--paid,
.myco-badge--trialing,
.myco-badge--bkp-manual,
.myco-badge--bkp-auto {
	background: var( --myco-success-fill-strong );
	color: var( --myco-accent-ink );
}

.myco-pill--warn,
.myco-badge--provisioning,
.myco-badge--pending_dns,
.myco-badge--pending,
.myco-badge--past_due,
.myco-badge--refunded,
.myco-badge--partially_refunded {
	background: var( --myco-warn-pill );
	color: var( --myco-warn-ink );
}

.myco-pill--danger,
.myco-badge--suspended,
.myco-badge--failed,
.myco-badge--charged_back {
	background: var( --myco-danger-pill );
	color: var( --myco-danger );
}

.myco-pill--neutral,
.myco-badge--draft,
.myco-badge--deleted,
.myco-badge--canceled,
.myco-badge--expired,
.myco-badge--void,
.myco-badge--uncollectible,
.myco-badge--bkp-delete,
.myco-badge--bkp-sub_end,
.myco-badge--bkp-pre_restore {
	background: var( --myco-active );
	color: var( --myco-text-2 );
}

/* Label badges (Default / Recommended / Current) — Hanken 600 on mint. */
.myco-pill--label,
.myco-tag {
	font-family: var( --myco-font-body );
	font-weight: 600;
	font-size: 11px;
	background: var( --myco-success-fill-strong );
	color: var( --myco-accent-ink );
}

.myco-pill--mint {
	font-family: var( --myco-font-body );
	font-weight: 600;
	background: var( --myco-accent );
	color: var( --myco-on-accent );
}

.myco-pill--on-dark {
	background: var( --myco-overlay-active-dark );
	color: var( --myco-cream );
}

.myco-pill--dot::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
}

/* ---- Card ---- */

.myco-card {
	background: var( --myco-card );
	border: 1px solid var( --myco-border );
	border-radius: var( --myco-radius );
	padding: var( --myco-card-pad );
	box-shadow: var( --myco-shadow );
	min-width: 0;
}

.myco-card--tight {
	padding: var( --myco-card-pad-tight );
}

.myco-card--flush {
	padding: 0;
	overflow: hidden;
}

.myco-card--dark {
	background: var( --myco-surface-dark );
	border-color: var( --myco-surface-dark );
	color: var( --myco-cream );
}

.myco-card--danger {
	border-color: var( --myco-danger-border );
}

.myco-card--dashed {
	border: 1.5px dashed var( --myco-border-dashed );
	background: transparent;
}

.myco-card--pad,
.myco-card--wide {
	width: 100%;
}

.myco-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.myco-card__head .myco-card__title {
	margin: 0;
}

.myco-card__foot {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var( --myco-divider );
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.myco-card__note {
	font-size: 13px;
	color: var( --myco-muted );
	padding-top: 10px;
	margin-top: 10px;
	border-top: 1px solid var( --myco-divider );
}

/* Inset well inside a card. */
.myco-well {
	background: var( --myco-well );
	border-radius: var( --myco-radius-sm );
	padding: 12px 14px;
}

.myco-well--row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* ---- Stat card ---- */

.myco-stat {
	background: var( --myco-card );
	border: 1px solid var( --myco-border );
	border-radius: var( --myco-radius );
	padding: var( --myco-card-pad-tight );
	min-width: 0;
}

.myco-stat__label {
	font-family: var( --myco-font-mono );
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var( --myco-muted );
}

.myco-stat__value {
	font-family: var( --myco-font-display );
	font-weight: var( --myco-display-weight );
	font-size: 28px;
	line-height: 1.15;
	margin-top: 8px;
	overflow-wrap: anywhere;
}

.myco-stat__value--md {
	font-size: 20px;
}

.myco-stat__value small,
.myco-stat__unit {
	font-family: var( --myco-font-body );
	font-weight: 400;
	font-size: 15px;
	color: var( --myco-text-2 );
}

.myco-stat__value.is-ok { color: var( --myco-accent-ink ); }
.myco-stat__value.is-warn { color: var( --myco-warn-ink ); }
.myco-stat__value.is-bad { color: var( --myco-danger ); }

.myco-stat__caption {
	font-size: 13px;
	color: var( --myco-text-2 );
	margin-top: 2px;
}

.myco-stat .myco-progress {
	margin-top: 10px;
}

/* ---- List rows (divider rows inside cards) ---- */

.myco-list {
	display: flex;
	flex-direction: column;
}

.myco-list__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 10px 0;
	border-top: 1px solid var( --myco-divider );
	font-size: 14px;
	min-width: 0;
}

.myco-list__row:first-child {
	border-top: 0;
}

.myco-list--bordered .myco-list__row:first-child {
	border-top: 1px solid var( --myco-divider );
}

.myco-list__main {
	min-width: 0;
	flex: 1 1 auto;
}

.myco-list__title {
	font-weight: 600;
}

.myco-list__meta {
	color: var( --myco-muted );
}

.myco-list__side {
	display: flex;
	align-items: center;
	gap: 14px;
	color: var( --myco-text-2 );
	white-space: nowrap;
	flex-shrink: 0;
}

/* ---- Data table (card-wrapped CSS grid) ---- */

.myco-tablewrap {
	position: relative; /* .screen-reader-text inside must not stretch the document */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.myco-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 560px;
}

.myco-table th {
	font-family: var( --myco-font-mono );
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var( --myco-muted );
	text-align: left;
	padding: 10px 12px;
	background: var( --myco-tint );
	border-bottom: 1px solid var( --myco-border );
	white-space: nowrap;
}

.myco-table td {
	padding: 12px;
	border-top: 1px solid var( --myco-divider );
	vertical-align: middle;
}

.myco-table tbody tr:first-child td {
	border-top: 0;
}

.myco-table tr.is-highlight td {
	background: var( --myco-tint );
}

.myco-table .right,
.myco-table .myco-table__num {
	text-align: right;
}

.myco-table__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	white-space: nowrap;
}

.myco-table__primary {
	font-weight: 600;
}

.myco-table__sub {
	display: block;
	font-size: 12px;
	color: var( --myco-muted );
}

.myco-table__mono {
	font-family: var( --myco-font-mono );
	font-size: 12px;
}

/* Grid-row variant: one .myco-trow per row, columns set per page. */
.myco-trow {
	display: grid;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-top: 1px solid var( --myco-divider );
	font-size: 14px;
}

.myco-trow--head {
	font-family: var( --myco-font-mono );
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var( --myco-muted );
	background: var( --myco-tint );
	border-top: 0;
	padding: 10px 14px;
}

