/**
 * Kramar — Admin Settings
 *
 * @package Kramar
 * @since   1.0.0
 */

/* -------------------------------------------------------------------------
 * Page layout
 * ---------------------------------------------------------------------- */

.kramar-description {
	font-size: 14px;
	color: #50575e;
	max-width: 680px;
	line-height: 1.6;
}

.kramar-settings .submit {
	max-width: 800px;
	padding-top: 16px;
}

/* -------------------------------------------------------------------------
 * Modules page — header
 * ---------------------------------------------------------------------- */

.kramar-modules-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 20px;
	position: sticky;
	top: 32px;
	z-index: 10;
	background: #f0f0f1;
	padding: 12px 0;
}
.kramar-modules-header__left {
	display: flex;
	align-items: center;
	gap: 10px;
}
.kramar-modules-header__left h1 {
	margin: 0;
	padding: 0;
}
.kramar-modules-header__count {
	font-size: 12px;
	font-weight: 600;
	color: #787c82;
	background: #e0e0e0;
	padding: 2px 8px;
	border-radius: 10px;
}
.kramar-modules-header__right {
	display: flex;
	align-items: center;
	gap: 8px;
}
.kramar-modules-search {
	padding: 6px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 4px;
	font-size: 13px;
	width: 220px;
	background: #fff;
}
.kramar-modules-search:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* -------------------------------------------------------------------------
 * Modules page — layout (sidebar + content)
 * ---------------------------------------------------------------------- */

.kramar-modules-layout {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 24px;
	align-items: start;
}
.kramar-modules-nav {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
@media (max-width: 860px) {
	.kramar-modules-layout { grid-template-columns: 1fr; }
	.kramar-modules-nav { display: none; }
}
@media (max-width: 480px) {
	.kramar-modules-header {
		flex-wrap: wrap;
		gap: 8px;
		padding: 8px 0;
	}
	.kramar-modules-header__right {
		width: 100%;
	}
	.kramar-modules-search {
		width: 100%;
		box-sizing: border-box;
	}
	.kramar-modules-content {
		min-width: 0;
	}
	.kramar-module__row {
		flex-wrap: wrap;
		gap: 8px;
	}
	.kramar-module__settings {
		padding-left: 16px;
		padding-right: 12px;
		box-sizing: border-box;
		max-width: 100%;
		overflow: hidden;
	}
	.kramar-module__extra {
		max-width: 100%;
	}
	.kramar-settings-stack {
		max-width: 100%;
	}
	.kramar-settings-stack input.regular-text,
	.kramar-settings-stack select,
	.kramar-settings-stack textarea,
	.kramar-module__extra input.regular-text,
	.kramar-module__extra select,
	.kramar-module__extra textarea {
		max-width: 100%;
		box-sizing: border-box;
	}
	.kramar-module__description {
		word-break: break-word;
	}
}
.kramar-modules-nav__link {
	font-size: 13px;
	color: #50575e;
	text-decoration: none;
	padding: 6px 10px;
	border-radius: 4px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.kramar-modules-nav__link:hover {
	background: #e0e0e0;
	color: #1e1e1e;
}
.kramar-modules-nav__link span {
	font-size: 11px;
	color: #a0aec0;
}
.kramar-modules-nav__link--muted {
	color: #a0aec0;
	font-size: 12px;
	margin-top: 8px;
}

/* -------------------------------------------------------------------------
 * Modules page — sections & cards
 * ---------------------------------------------------------------------- */

.kramar-modules-section {
	margin-bottom: 28px;
}
.kramar-modules-section__title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a0aec0;
	margin: 0 0 8px;
	padding: 0;
}

.kramar-module {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 0;
	margin-bottom: -1px;
}
.kramar-module:first-child { border-radius: 6px 6px 0 0; }
.kramar-module:last-child  { border-radius: 0 0 6px 6px; margin-bottom: 0; }
.kramar-module:only-child  { border-radius: 6px; }

.kramar-module__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
}

.kramar-module__info {
	flex: 1;
	min-width: 0;
}
.kramar-module__name {
	font-size: 13px;
	font-weight: 600;
	margin: 0;
	color: #1e1e1e;
	line-height: 1.3;
}
.kramar-module__description {
	font-size: 12px;
	color: #787c82;
	margin: 2px 0 0;
	line-height: 1.4;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.kramar-module__toggle {
	flex-shrink: 0;
}

.kramar-module__settings {
	padding: 4px 16px 16px 52px;
	border-top: 1px solid #f4f4f5;
}

.kramar-module--danger .kramar-module__row {
	background: #fcf0f1;
}
.kramar-module--danger .kramar-module__name {
	color: #b32d2e;
}

/* Extra settings inside expanded module card */
.kramar-module__extra {
	margin-top: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.kramar-module__extra label {
	font-size: 13px;
	color: #50575e;
}
.kramar-module__extra input[type="text"],
.kramar-module__extra input[type="number"] {
	padding: 4px 8px;
	font-size: 13px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
}
.kramar-module__extra input[type="text"] { width: 160px; }
.kramar-module__extra input[type="number"] { width: 70px; }
.kramar-module__extra input[type="text"]:focus,
.kramar-module__extra input[type="number"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}
.kramar-module__extra .description {
	font-size: 12px;
	color: #646970;
	font-style: italic;
}

.kramar-settings-stack {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 12px;
	max-width: 560px;
}
.kramar-settings-stack p { margin: 0; }
.kramar-settings-stack label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #50575e;
}
.kramar-settings-stack input[type="number"] { width: 80px; }
.kramar-settings-stack textarea { width: 100%; box-sizing: border-box; font-size: 12px; }
.kramar-settings-stack .description { display: block; margin-top: 4px; font-size: 12px; color: #646970; }

.kramar-category-title {
	font-size: 15px;
	font-weight: 600;
	margin: 28px 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #c3c4c7;
	color: #1d2327;
}

/* Custom Statuses */
.kramar-cs-context {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 6px;
	padding: 14px 18px;
	margin-bottom: 8px;
}
.kramar-cs-context p {
	margin: 0;
	font-size: 13px;
	color: #50575e;
	line-height: 1.5;
}
.kramar-cs-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	flex-shrink: 0;
	line-height: 1.4;
}
.kramar-cs-delete {
	background: none;
	border: none;
	color: #a0aec0;
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	flex-shrink: 0;
}
.kramar-cs-delete:hover { color: #d63638; }
.kramar-cs-delete .dashicons { font-size: 16px; width: 16px; height: 16px; }
.kramar-cs-add {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 6px;
	padding: 16px 20px;
	margin-top: 12px;
}
.kramar-cs-add h3 {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 12px;
	color: #1e1e1e;
}
.kramar-cs-form__row {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
}
.kramar-cs-form__row .kramar-settings-field { flex: 1; }
.kramar-cs-form__row .kramar-settings-field:last-child { flex: 0 0 auto; }
.kramar-cs-form__flags {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 14px;
}
@media (max-width: 680px) {
	.kramar-cs-form__flags { grid-template-columns: 1fr; }
}
.kramar-cs-flag {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: #50575e;
	cursor: pointer;
	padding: 8px 10px;
	border: 1px solid #e4e4e7;
	border-radius: 4px;
	background: #fafafa;
}
.kramar-cs-flag:hover { border-color: #d0d5dd; }
.kramar-cs-flag input { margin-top: 2px; }
.kramar-cs-flag strong { display: block; color: #1e1e1e; font-size: 13px; }
.kramar-cs-flag span { font-size: 12px; line-height: 1.4; }
.kramar-cs-color {
	display: flex;
	gap: 4px;
	align-items: center;
}
.kramar-cs-color input[type="color"] {
	width: 32px;
	height: 28px;
	padding: 1px;
	border: 1px solid #d0d5dd;
	border-radius: 3px;
	cursor: pointer;
}
.kramar-cs-hex {
	width: 70px;
	padding: 4px 6px;
	font-size: 12px;
	font-family: monospace;
	border: 1px solid #d0d5dd;
	border-radius: 3px;
}

/* -------------------------------------------------------------------------
 * Order Statuses sub-page
 * ---------------------------------------------------------------------- */

.kramar-os-page .kramar-os-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 20px;
}
.kramar-os-page .kramar-os-header h1 {
	margin: 0;
	padding: 0;
}

/* Add form wrapper */
.kramar-os-form-wrap {
	margin-bottom: 20px;
}
.kramar-os-form-card {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 20px 24px;
}
.kramar-os-form-card h2 {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 16px;
	padding: 0;
	color: #1e1e1e;
}

/* Form row: name + colors */
.kramar-os-form-row {
	display: flex;
	gap: 14px;
	margin-bottom: 14px;
	align-items: flex-end;
	flex-wrap: wrap;
}
.kramar-os-form__name {
	flex: 1 1 240px;
	margin-bottom: 0 !important;
}
.kramar-os-form__color {
	flex: 0 0 auto;
	margin-bottom: 0 !important;
}
.kramar-os-form__slug {
	flex: 1 1 200px;
	margin-bottom: 0 !important;
}
.kramar-os-form__slug .description {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	line-height: 1.4;
}
.kramar-os-form__slug .kramar-os-slug-static {
	display: inline-block;
	padding: 6px 0;
}
.kramar-os-slug-input.is-too-long {
	border-color: #d63638;
}
.kramar-os-slug-hint.is-too-long {
	color: #d63638;
	font-weight: 600;
}

/* Form actions row */
.kramar-os-form-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	margin-top: 16px;
}

/* Status list */
.kramar-os-list {
	margin-bottom: 24px;
}
.kramar-os-card {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 0;
	margin-bottom: -1px;
}
.kramar-os-card:first-child  { border-radius: 6px 6px 0 0; }
.kramar-os-card:last-child   { border-radius: 0 0 6px 6px; margin-bottom: 0; }
.kramar-os-card:only-child   { border-radius: 6px; }

.kramar-os-notice {
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 13px;
	margin-bottom: 16px;
}
.kramar-os-notice--success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}
.kramar-os-notice--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}
.kramar-os-notice--warning {
	background: #fffbeb;
	color: #92400e;
	border: 1px solid #fde68a;
}
.kramar-os-card__row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
}
.kramar-os-card__info {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.kramar-os-card__info strong {
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
}
.kramar-os-card__slug code {
	font-size: 11px;
	color: #a0aec0;
	background: none;
	padding: 0;
}
.kramar-os-card__flags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
}
.kramar-os-flag-pill {
	display: inline-block;
	padding: 1px 7px;
	background: #f4f4f5;
	border: 1px solid #e4e4e7;
	border-radius: 10px;
	font-size: 11px;
	color: #50575e;
	font-weight: 500;
}
.kramar-os-flag-pill--error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}
.kramar-os-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}
.kramar-os-card__count {
	font-size: 12px;
	color: #787c82;
}

/* Inline edit form */
.kramar-os-edit-form-wrap {
	border-top: 1px solid #f4f4f5;
	padding: 16px 20px;
	background: #fafafa;
	border-radius: 0 0 6px 6px;
}
.kramar-os-card:first-child .kramar-os-edit-form-wrap { border-radius: 0; }
.kramar-os-card:only-child .kramar-os-edit-form-wrap  { border-radius: 0 0 6px 6px; }

/* Empty state */
.kramar-os-empty {
	background: #fff;
	border: 1px dashed #d0d5dd;
	border-radius: 8px;
	padding: 40px 24px;
	text-align: center;
	margin-bottom: 24px;
}
.kramar-os-empty p {
	font-size: 14px;
	color: #787c82;
	margin: 0 0 12px;
}

/* Developer Reference card */
.kramar-os-devref {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 20px 24px;
	margin-top: 8px;
}
.kramar-os-devref h2 {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a0aec0;
	margin: 0 0 16px;
	padding: 0;
}
.kramar-os-devref__intro {
	font-size: 13px;
	color: #50575e;
	margin: 0 0 6px;
}
.kramar-os-devref__code {
	background: #f6f7f7;
	border: 1px solid #e4e4e7;
	border-radius: 4px;
	padding: 10px 14px;
	font-size: 12px;
	font-family: Consolas, Monaco, 'Courier New', monospace;
	color: #1e1e1e;
	overflow-x: auto;
	margin: 0 0 16px;
	white-space: pre;
	max-width: 100%;
	box-sizing: border-box;
}
.kramar-os-devref__slugs {
	font-size: 13px;
	color: #50575e;
	margin: 0;
}
.kramar-os-devref__slugs code {
	display: inline-block;
	background: #f6f7f7;
	border: 1px solid #e4e4e7;
	border-radius: 3px;
	padding: 1px 6px;
	font-size: 12px;
	font-family: Consolas, Monaco, 'Courier New', monospace;
	margin: 2px 4px 2px 0;
	color: #1e1e1e;
}

/* -------------------------------------------------------------------------
 * Toggle switch (CSS-only)
 * ---------------------------------------------------------------------- */

.kramar-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	cursor: pointer;
}

/* Hide the real checkbox but keep it focusable. */
.kramar-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

/* Track (background bar). */
.kramar-toggle__slider {
	position: absolute;
	inset: 0;
	background-color: #c3c4c7;
	border-radius: 24px;
	transition: background-color 0.2s ease;
}

/* Knob (circle). */
.kramar-toggle__slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Checked state. */
.kramar-toggle input:checked + .kramar-toggle__slider {
	background-color: #2271b1;
}

.kramar-toggle input:checked + .kramar-toggle__slider::before {
	transform: translateX(20px);
}

/* Focus-visible outline for keyboard navigation. */
.kramar-toggle input:focus-visible + .kramar-toggle__slider {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

/* Reusable card / panel. */
.kramar-card {
	max-width: 760px;
	margin: 1.5em 0;
	padding: 1em 1.25em;
	border: 1px solid #dcdcde;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Module whose prerequisite isn't met. */
.kramar-module--unavailable {
	opacity: 0.6;
}

.kramar-module--unavailable .kramar-module__name {
	color: #646970;
}

.kramar-module__unavailable {
	margin: 0.5em 0 0;
	font-style: italic;
	color: #646970;
}

.kramar-module--unavailable .kramar-toggle {
	cursor: not-allowed;
}

/* "Not installed" pill shown next to the module name when unavailable. */
.kramar-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.7;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #8a6d00;
	background: #fcf3d4;
	border: 1px solid #e6c84f;
	border-radius: 9px;
	vertical-align: middle;
}

/* Data & uninstall "danger zone" panel. */
.kramar-module--danger {
	border-color: #d63638;
	background: #fcf0f1;
}

.kramar-module__danger-note {
	margin: 0.5em 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #b32d2e;
}

/* -------------------------------------------------------------------------
 * Dashboard
 * ---------------------------------------------------------------------- */

/* Setup wizard */
.kramar-setup {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 20px 24px;
	margin: 20px 0;
}
.kramar-setup__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.kramar-setup__header div {
	display: flex;
	align-items: center;
	gap: 10px;
}
.kramar-setup__header h2 {
	font-size: 15px;
	font-weight: 600;
	margin: 0;
	padding: 0;
	color: #1e1e1e;
}
.kramar-setup__progress {
	font-size: 12px;
	font-weight: 600;
	color: #787c82;
	background: #f0f0f1;
	padding: 2px 8px;
	border-radius: 10px;
}
.kramar-setup__dismiss {
	background: none;
	border: none;
	font-size: 20px;
	color: #a0aec0;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
}
.kramar-setup__dismiss:hover { color: #1e1e1e; }
.kramar-setup__bar {
	height: 4px;
	background: #f0f0f1;
	border-radius: 2px;
	margin-bottom: 16px;
	overflow: hidden;
}
.kramar-setup__bar-fill {
	height: 100%;
	background: #00a32a;
	border-radius: 2px;
	transition: width 0.3s;
}
.kramar-setup__steps {
	display: flex;
	flex-direction: column;
}
.kramar-setup__step {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid #f4f4f5;
}
.kramar-setup__step:last-child { border-bottom: none; padding-bottom: 0; }
.kramar-setup__step:first-child { padding-top: 0; }
.kramar-setup__step-num {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #f0f0f1;
	color: #787c82;
	font-size: 12px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
}
.kramar-setup__step--done .kramar-setup__step-num {
	background: none;
	color: #00a32a;
}
.kramar-setup__step--done .kramar-setup__step-num .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}
.kramar-setup__step-body {
	flex: 1;
	min-width: 0;
}
.kramar-setup__step-body strong {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #1e1e1e;
}
.kramar-setup__step--done .kramar-setup__step-body strong { color: #787c82; }
.kramar-setup__step-body span {
	font-size: 12px;
	color: #a0aec0;
}
.kramar-setup__step .button-small { flex-shrink: 0; }

.kramar-dash-metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin: 20px 0;
}
@media (max-width: 800px) {
	.kramar-dash-metrics { grid-template-columns: repeat(2, 1fr); }
}
.kramar-metric {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
}
.kramar-metric__value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #1e1e1e;
	line-height: 1.2;
}
.kramar-metric__value--green { color: #00a32a; }
.kramar-metric__value--amber { color: #dba617; }
.kramar-metric__value--red   { color: #d63638; }
.kramar-metric__label {
	display: block;
	font-size: 12px;
	color: #787c82;
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.kramar-metric__link {
	display: inline-block;
	font-size: 12px;
	color: #2271b1;
	text-decoration: none;
	margin-top: 8px;
}

.kramar-dash-main {
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 20px;
	align-items: start;
}
@media (max-width: 960px) {
	.kramar-dash-main { grid-template-columns: 1fr; }
}
.kramar-dash-left,
.kramar-dash-right {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.kramar-dashboard-card {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 20px 24px;
}
.kramar-dashboard-card h2 {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a0aec0;
	margin: 0 0 14px;
	padding: 0;
}
.kramar-checklist {
	display: flex;
	flex-direction: column;
}
.kramar-check {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f4f4f5;
}
.kramar-check:last-child { border-bottom: none; padding-bottom: 0; }
.kramar-check:first-child { padding-top: 0; }
.kramar-check__icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	font-size: 18px;
	line-height: 18px;
}
.kramar-check--ok .kramar-check__icon    { color: #00a32a; }
.kramar-check--warn .kramar-check__icon  { color: #dba617; }
.kramar-check--error .kramar-check__icon { color: #d63638; }
.kramar-check--info .kramar-check__icon  { color: #2271b1; }
.kramar-check__body {
	flex: 1;
	min-width: 0;
	font-size: 13px;
	color: #1e1e1e;
}
.kramar-check__body strong {
	display: block;
	font-size: 13px;
	font-weight: 600;
}
.kramar-check__value {
	font-size: 11px;
	color: #a0aec0;
}
.kramar-check__link {
	font-size: 12px;
	text-decoration: none;
	color: #2271b1;
	font-weight: 500;
	flex-shrink: 0;
}
.kramar-check__link:hover { color: #135e96; }

.kramar-impact-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.kramar-impact-list li {
	padding: 8px 0;
	border-bottom: 1px solid #f4f4f5;
	font-size: 13px;
	color: #1e1e1e;
	padding-left: 16px;
	position: relative;
}
.kramar-impact-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #00a32a;
}
.kramar-impact-list li:last-child { border-bottom: none; }

.kramar-env-list div {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #f4f4f5;
	font-size: 13px;
}
.kramar-env-list div:last-child { border-bottom: none; }
.kramar-env-list div span:first-child { color: #787c82; }
.kramar-env-list div span:last-child { color: #1e1e1e; font-weight: 500; }

/* -------------------------------------------------------------------------
 * Settings sub-page (Kramar → Settings)
 * ---------------------------------------------------------------------- */

.kramar-settings-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}
@media (max-width: 1100px) {
	.kramar-settings-grid {
		grid-template-columns: 1fr;
	}
}
.kramar-settings-card {
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	padding: 24px;
}
.kramar-settings-card h2 {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 4px;
	padding: 0;
}
.kramar-settings-card__desc {
	font-size: 13px;
	color: #787c82;
	margin: 0 0 16px;
}
.kramar-settings-field {
	margin-bottom: 12px;
}
.kramar-settings-field:last-child {
	margin-bottom: 0;
}
.kramar-settings-field label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #1e1e1e;
	margin-bottom: 4px;
}
.kramar-settings-field input,
.kramar-settings-field textarea {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #d0d5dd;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.4;
	box-sizing: border-box;
}
.kramar-settings-field textarea {
	resize: vertical;
}
.kramar-settings-field input:focus,
.kramar-settings-field textarea:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* =========================================================================
   Dark Mode (.dark-mode on <body>)
   ========================================================================= */

/* --- Modules page: sticky header + search --- */
.dark-mode .kramar-modules-header {
	background: #1d2327;
}
.dark-mode .kramar-modules-header__count {
	background: #3c434a;
	color: #f0f0f1;
}
.dark-mode .kramar-modules-search {
	background: #2c3338;
	border-color: #3c434a;
	color: #f0f0f1;
}

/* --- Modules page: nav sidebar --- */
.dark-mode .kramar-modules-nav__link {
	color: #a7aaad;
}
.dark-mode .kramar-modules-nav__link:hover {
	background: #2c3338;
	color: #f0f0f1;
}

/* --- Module cards --- */
.dark-mode .kramar-module {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-module__name {
	color: #f0f0f1;
}
.dark-mode .kramar-module__description {
	color: #a7aaad;
}
.dark-mode .kramar-module__settings {
	border-top-color: #3c434a;
}
.dark-mode .kramar-module--danger .kramar-module__row {
	background: #2c1b1c;
}

/* --- Settings stack (inside expanded modules) --- */
.dark-mode .kramar-settings-stack label {
	color: #a7aaad;
}
.dark-mode .kramar-settings-stack .description {
	color: #787c82;
}

/* --- DM-1: Feed URL <code> (inline-styled, needs !important) --- */
.dark-mode .kramar-module__settings code[style*="background"] {
	background: #2c3338 !important;
	color: #72aee6 !important;
	border: 1px solid #3c434a !important;
}

/* --- DM-6: Google Merchant Center instructions panel (inline-styled) --- */
.dark-mode .kramar-module__settings div[style*="background:#eff6ff"] {
	background: #1a2733 !important;
	border-color: #2e4a62 !important;
	color: #a7d0f2 !important;
}

/* --- DM2-01: gray "How it works" info panel (inline-styled #f8f9fa) --- */
.dark-mode .kramar-module__settings div[style*="background:#f8f9fa"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode .kramar-module__settings div[style*="background:#f8f9fa"] strong {
	color: #f0f0f1 !important;
}

/* --- DM2-02: red destructive-action warning panel (inline-styled #fef2f2) --- */
.dark-mode .kramar-module__settings div[style*="background:#fef2f2"] {
	background: #2b1d1d !important;
	border-color: #7f1d1d !important;
	border-left-color: #dc2626 !important;
	color: #f0a9a9 !important;
}

/* --- Custom Statuses (modules page) --- */
.dark-mode .kramar-cs-context {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-cs-context p {
	color: #a7aaad;
}
.dark-mode .kramar-cs-add {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-cs-add h3 {
	color: #f0f0f1;
}
.dark-mode .kramar-cs-flag {
	background: #2c3338;
	border-color: #3c434a;
	color: #a7aaad;
}
.dark-mode .kramar-cs-flag:hover {
	border-color: #50575e;
}
.dark-mode .kramar-cs-flag strong {
	color: #f0f0f1;
}

/* --- DM-3: Order Statuses — Add Status form card --- */
.dark-mode .kramar-os-form-card {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-os-form-card h2 {
	color: #f0f0f1;
}

/* --- DM-2: Order Statuses — status list cards --- */
.dark-mode .kramar-os-card {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-os-card__info strong {
	color: #f0f0f1;
}
.dark-mode .kramar-os-flag-pill {
	background: #2c3338;
	border-color: #3c434a;
	color: #a7aaad;
}
.dark-mode .kramar-os-flag-pill--error {
	background: #2c1b1b;
	border-color: #991b1b;
	color: #fca5a5;
}
.dark-mode .kramar-os-edit-form-wrap {
	background: #23282d;
	border-top-color: #3c434a;
}

/* --- DM-2: Order Statuses — empty state --- */
.dark-mode .kramar-os-empty {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-os-empty p {
	color: #a7aaad;
}

/* --- DM-2: Order Statuses — developer reference card --- */
.dark-mode .kramar-os-devref {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-os-devref h2 {
	color: #a7aaad;
}
.dark-mode .kramar-os-devref__intro {
	color: #a7aaad;
}
.dark-mode .kramar-os-devref__code {
	background: #2c3338;
	border-color: #3c434a;
	color: #72aee6;
}
.dark-mode .kramar-os-devref__slugs {
	color: #a7aaad;
}
.dark-mode .kramar-os-devref__slugs code {
	background: #2c3338;
	border-color: #3c434a;
	color: #72aee6;
}

/* --- Order Status notices --- */
.dark-mode .kramar-os-notice--success {
	background: #0d2818;
	color: #6ee7b7;
	border-color: #065f46;
}
.dark-mode .kramar-os-notice--error {
	background: #2c1b1b;
	color: #fca5a5;
	border-color: #991b1b;
}
.dark-mode .kramar-os-notice--warning {
	background: #2b2413;
	color: #fcd34d;
	border-color: #92400e;
}

/* --- Reusable .kramar-card panel --- */
.dark-mode .kramar-card {
	background: #1d2327;
	border-color: #3c434a;
}

/* --- Dashboard: setup wizard, metrics, cards --- */
.dark-mode .kramar-setup {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-setup__header h2 {
	color: #f0f0f1;
}
.dark-mode .kramar-setup__progress {
	background: #2c3338;
	color: #a7aaad;
}
.dark-mode .kramar-setup__bar {
	background: #2c3338;
}
.dark-mode .kramar-setup__step {
	border-bottom-color: #3c434a;
}
.dark-mode .kramar-setup__step-num {
	background: #2c3338;
	color: #a7aaad;
}
.dark-mode .kramar-setup__step-body strong {
	color: #f0f0f1;
}
.dark-mode .kramar-metric {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-metric__value {
	color: #f0f0f1;
}
.dark-mode .kramar-metric__label {
	color: #a7aaad;
}
.dark-mode .kramar-dashboard-card {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-dashboard-card h2 {
	color: #a7aaad;
}
.dark-mode .kramar-check {
	border-bottom-color: #3c434a;
}
.dark-mode .kramar-check__body {
	color: #f0f0f1;
}
.dark-mode .kramar-impact-list li {
	border-bottom-color: #3c434a;
	color: #f0f0f1;
}
.dark-mode .kramar-env-list div {
	border-bottom-color: #3c434a;
}
.dark-mode .kramar-env-list div span:last-child {
	color: #f0f0f1;
}

/* --- Settings sub-page cards --- */
.dark-mode .kramar-settings-card {
	background: #1d2327;
	border-color: #3c434a;
}
.dark-mode .kramar-settings-card h2 {
	color: #f0f0f1;
}
.dark-mode .kramar-settings-card__desc {
	color: #a7aaad;
}
.dark-mode .kramar-settings-field label {
	color: #f0f0f1;
}
.dark-mode .kramar-settings-field input,
.dark-mode .kramar-settings-field textarea {
	background: #2c3338;
	border-color: #3c434a;
	color: #f0f0f1;
}

/* --- DM-4: Invoice doc cards (inline-styled, needs !important) --- */
.dark-mode .kramar-ib-doc-card {
	background: #1d2327 !important;
	border-color: #3c434a !important;
}
.dark-mode .kramar-ib-doc-card h2 {
	color: #f0f0f1 !important;
}
.dark-mode .kramar-ib-doc-card p {
	color: #a7aaad !important;
}

/* --- Category title (used on various pages) --- */
.dark-mode .kramar-category-title {
	color: #f0f0f1;
	border-bottom-color: #3c434a;
}

/* --- Badge (unavailable modules) --- */
.dark-mode .kramar-badge {
	background: #332b00;
	border-color: #665500;
	color: #fde68a;
}

/* --- Description text --- */
.dark-mode .kramar-description {
	color: #a7aaad;
}

/* --- DM2-03: remaining light/near-white inline backgrounds --- */

/* #fafafa — VAT Validation panel on order edit */
.dark-mode div[style*="background:#fafafa"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode div[style*="background:#fafafa"] strong {
	color: #f0f0f1 !important;
}
.dark-mode div[style*="background:#fafafa"] span[style*="color:#555"] {
	color: #a7aaad !important;
}

/* #f9f9f9 — Swatch button-type badge in admin attribute column */
.dark-mode span[style*="background:#f9f9f9"] {
	background: #2c3338 !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}

/* #f3f4f6 — code elements (e.g. Feed URL) inside module settings */
.dark-mode .kramar-module__settings code[style*="background:#f3f4f6"] {
	background: #2c3338 !important;
	color: #72aee6 !important;
	border: 1px solid #3c434a !important;
}

/* #f9fafb, #f6f6f6, #f0f0f0, #f0f0f1, #e0e0e0 — generic near-white
   backgrounds in module settings (future-proofing) */
.dark-mode .kramar-module__settings div[style*="background:#f9fafb"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode .kramar-module__settings div[style*="background:#f6f6f6"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode .kramar-module__settings div[style*="background:#f0f0f0"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode .kramar-module__settings div[style*="background:#f0f0f1"] {
	background: #23282d !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}
.dark-mode .kramar-module__settings div[style*="background:#e0e0e0"] {
	background: #2c3338 !important;
	border-color: #3c434a !important;
	color: #a7aaad !important;
}

/* --- DM2-04: light tinted inline backgrounds --- */

/* #eef2ff — indigo (delivery date badge in orders column) */
.dark-mode span[style*="background:#eef2ff"] {
	background: #1e2233 !important;
	color: #b9c2f0 !important;
}

/* #fff8e1 — amber warning (inside module settings only, not PDF) */
.dark-mode .kramar-module__settings div[style*="background:#fff8e1"] {
	background: #2b2515 !important;
	border-color: #665500 !important;
	color: #e8c979 !important;
}

/* #e6f4ea — green verified badge (in module settings context) */
.dark-mode .kramar-module__settings span[style*="background:#e6f4ea"] {
	background: #16281b !important;
	border-color: #2d5a38 !important;
	color: #9fd8ac !important;
}

/* --- DM2-05: inner text overrides for dark-on-dark prevention --- */
.dark-mode .kramar-module__settings div[style*="background:#f9fafb"] strong,
.dark-mode .kramar-module__settings div[style*="background:#f6f6f6"] strong,
.dark-mode .kramar-module__settings div[style*="background:#f0f0f0"] strong,
.dark-mode .kramar-module__settings div[style*="background:#f0f0f1"] strong,
.dark-mode .kramar-module__settings div[style*="background:#e0e0e0"] strong,
.dark-mode .kramar-module__settings div[style*="background:#fff8e1"] strong {
	color: #f0f0f1 !important;
}

/* Inline dark text (#1d2327, #50575e, #3c434a) inside any themed panel */
.dark-mode .kramar-module__settings div[style*="background:#f8f9fa"] [style*="color:#1d2327"],
.dark-mode .kramar-module__settings div[style*="background:#f8f9fa"] [style*="color:#50575e"],
.dark-mode .kramar-module__settings div[style*="background:#fef2f2"] [style*="color:#7f1d1d"],
.dark-mode .kramar-module__settings div[style*="background:#eff6ff"] [style*="color:#1e3a5f"] {
	color: inherit !important;
}

/* --- Legal checkbox: unlinked placeholder warning --- */
.kramar-legal-warning {
	color: #8a6100;
	font-size: 12px;
	margin-top: -6px;
}
/* Specific enough to beat the Dark Mode plugin's `body.wp-admin.dark-mode p`. */
body.wp-admin.dark-mode p.kramar-legal-warning {
	color: #fcd34d;
}
