/* Coin & Note Marketplace – inherits the theme's fonts; one banknote-green accent. */
.cnm {
	--cnm-ink: #1f2421;
	--cnm-muted: #5f6b66;
	--cnm-line: #d9dfdc;
	--cnm-surface: #ffffff;
	--cnm-tint: #f3f6f4;
	--cnm-accent: #1d5b4a;
	--cnm-accent-ink: #ffffff;
	--cnm-danger: #a12d2d;
	max-width: 1100px;
	margin: 0 auto;
	color: var(--cnm-ink);
}
.cnm *, .cnm *::before, .cnm *::after { box-sizing: border-box; }

/* Intro */
.cnm-intro { max-width: 640px; margin-bottom: 28px; }
.cnm-intro h2 { margin: 0 0 8px; }
.cnm-intro p { margin: 0; color: var(--cnm-muted); line-height: 1.6; }

/* Layout */
.cnm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.cnm-card { background: var(--cnm-surface); border: 1px solid var(--cnm-line); border-radius: 8px; padding: 24px; }
.cnm-card h3 { margin-top: 0; }
.cnm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

/* Tabs */
.cnm-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--cnm-line); margin-bottom: 24px; }
.cnm-tabs a { padding: 10px 14px; color: var(--cnm-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cnm-tabs a:hover { color: var(--cnm-ink); }
.cnm-tabs a.is-active { color: var(--cnm-ink); border-bottom-color: var(--cnm-accent); font-weight: 600; }
.cnm-tabs .cnm-tabs__logout { margin-left: auto; }

/* Notices */
.cnm-notice { padding: 12px 16px; border-left: 4px solid; border-radius: 4px; margin: 0 0 20px; background: var(--cnm-tint); }
.cnm-notice--success { border-color: #2e7d4f; background: #edf7f1; }
.cnm-notice--error { border-color: var(--cnm-danger); background: #fbeeee; }
.cnm-notice--info { border-color: var(--cnm-accent); }

/* Forms */
.cnm-form p { margin: 0 0 16px; }
.cnm-form label, .cnm-form legend { display: block; font-weight: 600; margin-bottom: 6px; }
.cnm-form input[type="text"], .cnm-form input[type="email"], .cnm-form input[type="tel"],
.cnm-form input[type="password"], .cnm-form input[type="number"], .cnm-form select, .cnm-form textarea,
.cnm .login-username input, .cnm .login-password input {
	width: 100%; padding: 10px 12px; border: 1px solid #b9c3be; border-radius: 6px; background: #fff; font: inherit; color: inherit;
}
.cnm input:focus-visible, .cnm select:focus-visible, .cnm textarea:focus-visible, .cnm a:focus-visible, .cnm button:focus-visible {
	outline: 2px solid var(--cnm-accent); outline-offset: 2px;
}
.cnm-type { border: 0; padding: 0; margin: 0 0 20px; }
.cnm-type label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-right: 12px; padding: 10px 16px; border: 1px solid var(--cnm-line); border-radius: 6px; cursor: pointer; }
.cnm-type label:has(input:checked) { border-color: var(--cnm-accent); background: var(--cnm-tint); }
.cnm-hint { display: block; margin-top: 4px; font-size: 0.875em; color: var(--cnm-muted); }
.cnm-fee-note { padding: 12px 16px; background: var(--cnm-tint); border-radius: 6px; }
.cnm-hp { position: absolute !important; left: -9999px; }
.cnm-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.cnm-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--cnm-line); }

/* Buttons */
.cnm-btn, .cnm .login-submit .button {
	display: inline-block; padding: 11px 20px; border: 0; border-radius: 6px; background: var(--cnm-accent); color: var(--cnm-accent-ink);
	font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.cnm-btn:hover, .cnm .login-submit .button:hover { filter: brightness(1.12); color: var(--cnm-accent-ink); }
.cnm-btn--small { padding: 7px 12px; font-size: 0.875em; }

/* Tables */
.cnm-table-wrap { overflow-x: auto; }
.cnm-table { width: 100%; border-collapse: collapse; }
.cnm-table th { text-align: left; font-size: 0.875em; color: var(--cnm-muted); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--cnm-line); }
.cnm-table td { padding: 12px 10px; border-bottom: 1px solid var(--cnm-line); vertical-align: top; }
.cnm-table img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.cnm-actions { white-space: nowrap; }
.cnm-actions a { margin-right: 12px; }
.cnm-actions a.cnm-btn { margin-bottom: 6px; }
.cnm-danger { color: var(--cnm-danger); }
.cnm-address { font-size: 0.9em; line-height: 1.5; margin-bottom: 10px; }
.cnm-ship { display: flex; flex-wrap: wrap; gap: 6px; }
.cnm-ship input { flex: 1 1 120px; padding: 7px 10px; border: 1px solid #b9c3be; border-radius: 6px; font: inherit; }

/* Badges */
.cnm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8125em; font-weight: 600; background: #eceeed; color: #444; white-space: nowrap; }
.cnm-badge--live { background: #e3f2ea; color: #1d5b3a; }
.cnm-badge--review { background: #fdf2dc; color: #7a5200; }
.cnm-badge--fee { background: #fbe7e7; color: #8e2424; }
.cnm-badge--sold { background: #e4e9f7; color: #2b3f7a; }

/* Stats */
.cnm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.cnm-stats > div { border: 1px solid var(--cnm-line); border-radius: 8px; padding: 16px; }
.cnm-stats span { display: block; color: var(--cnm-muted); font-size: 0.875em; margin-bottom: 4px; }
.cnm-stats strong { font-size: 1.375em; }

/* Empty state */
.cnm-empty { padding: 40px 24px; text-align: center; border: 1px dashed var(--cnm-line); border-radius: 8px; }
.cnm-empty p { color: var(--cnm-muted); max-width: 460px; margin: 0 auto 16px; }

/* Product page */
.cnm-soldby { color: #5f6b66; margin: 8px 0 16px; }

/* Mobile: tables become stacked rows */
@media (max-width: 640px) {
	.cnm-table thead { display: none; }
	.cnm-table, .cnm-table tbody, .cnm-table tr, .cnm-table td { display: block; width: 100%; }
	.cnm-table tr { border: 1px solid var(--cnm-line); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
	.cnm-table td { border: 0; padding: 6px 0; }
	.cnm-table td::before { content: attr(data-label); display: block; font-size: 0.8em; color: var(--cnm-muted); }
	.cnm-actions { white-space: normal; }
	.cnm-tabs .cnm-tabs__logout { margin-left: 0; }
}
