/* ── Settings page styles ──────────────────────────────────────────── */
/* This is a plain stylesheet outside the webpack build, so it can't import
   shared/tokens.js like the React admin screens do — its colour/radius
   literals (#E2E8F0, 8px, etc.) must be kept in sync with that file by hand. */
.co-settings-wrap {
	max-width: 1100px;
	padding: 32px 28px 64px;
	font-family: 'Archivo', -apple-system, 'Segoe UI', sans-serif;
}
.co-settings-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
	margin-bottom: 20px;
}
.co-settings-grid .co-card--full {
	grid-column: 1 / -1;
}
.co-settings-grid .co-card {
	margin-bottom: 0;
}
@media (max-width: 900px) {
	.co-settings-grid { grid-template-columns: 1fr; }
}
.co-settings-hero {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 36px;
}
.co-settings-hero__icon {
	width: 52px;
	height: 52px;
	background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 4px 12px rgba(99,102,241,.25);
}
.co-settings-hero__title {
	font-family: var(--co-font);
	font-size: 28px;
	font-weight: 800;
	letter-spacing: -.5px;
	margin: 0;
	line-height: 1;
}
.co-settings-hero__sub {
	font-size: 14px;
	color: #94A3B8;
	margin: 6px 0 0;
	line-height: 1.5;
}
.co-card {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 16px;
	padding: 28px 32px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.co-card--danger {
	border-color: #FECACA;
	background: #FEF2F2;
}
.co-card--danger .co-card__title {
	color: #991B1B;
}
.co-card__title {
	font-size: 15px;
	font-weight: 700;
	color: #1A1A2E;
	margin: 0 0 4px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.co-card__title svg { flex-shrink: 0; }
.co-card__desc {
	font-size: 13px;
	color: #6B7280;
	margin: 0 0 24px;
	line-height: 1.6;
}
.co-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 100px;
}
.co-badge--test { background: #FEF3C7; color: #92400E; }
.co-badge--live { background: #ECFDF5; color: #065F46; }
.co-badge--none { background: #F3F4F6; color: #6B7280; }
.co-field { margin-bottom: 22px; }
.co-field:last-child { margin-bottom: 0; }
.co-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 7px;
}
.co-label span {
	font-weight: 400;
	color: #9CA3AF;
	font-size: 12px;
	margin-left: 4px;
}
input.co-input, select.co-input, textarea.co-input {
	width: 100%;
	height: 42px;
	border: 1.5px solid #E2E8F0;
	border-radius: 8px;
	padding: 0 14px;
	font-size: 13px;
	font-family: 'DM Mono', 'Courier New', monospace;
	color: #1A1A2E;
	background: #FAFAFA;
	transition: border-color .15s, box-shadow .15s;
	outline: none;
	letter-spacing: 0.03em;
	box-sizing: border-box;
}
input.co-input:focus, select.co-input:focus, textarea.co-input:focus {
	border-color: #6366F1;
	box-shadow: 0 0 0 3px rgba(99,102,241,.12);
	background: #fff;
}
input.co-input::placeholder, textarea.co-input::placeholder { color: #9CA3AF; font-family: -apple-system, sans-serif; letter-spacing: 0; }
.co-webhook-row { display: flex; gap: 8px; }
.co-webhook-row .co-input { flex: 1; color: #6B7280; background: #F9FAFB; cursor: default; }
.co-copy-btn {
	height: 42px;
	padding: 0 16px;
	background: #F3F4F6;
	border: 1.5px solid #D1D5DB;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	cursor: pointer;
	transition: background .15s;
	white-space: nowrap;
	font-family: inherit;
}
.co-copy-btn:hover { background: #E5E7EB; }
.co-notice {
	padding: 12px 18px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}
.co-notice--success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.co-notice--error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.co-btn-save {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	height: 44px;
	padding: 0 26px;
	background: #6366F1;
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s, box-shadow .15s, transform .1s;
	box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.co-btn-save:hover { background: #4F46E5; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,.4); }
.co-btn-save:active { transform: none; }
.co-plan-select {
	height: 42px;
	border: 1.5px solid #D1D5DB;
	border-radius: 9px;
	padding: 0 14px;
	font-size: 13px;
	font-weight: 600;
	color: #1A1A2E;
	background: #fff;
	cursor: pointer;
	outline: none;
	transition: border-color .15s;
}
.co-plan-select:focus { border-color: #6366F1; }
.co-help {
	font-size: 12px;
	color: #9CA3AF;
	margin-top: 6px;
	line-height: 1.5;
}
.co-help a { color: #6366F1; text-decoration: none; }
.co-help a:hover { text-decoration: underline; }
.co-hint { font-size: 12px; color: #9CA3AF; margin-top: 6px; line-height: 1.5; }
.co-divider { height: 1px; background: #F3F4F6; margin: 24px 0; }
.co-test-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}
.co-test-result {
	font-size: 13px;
	font-weight: 600;
}
/* ── Branding card ──────────────────────────────────────────────────── */
.co-color-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
#co-brand-color-picker {
	-webkit-appearance: none;
	appearance: none;
	width: 42px;
	height: 42px;
	border: 1.5px solid #E2E8F0;
	border-radius: 8px;
	padding: 3px;
	background: #FAFAFA;
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color .15s, box-shadow .15s;
}
#co-brand-color-picker::-webkit-color-swatch-wrapper { padding: 0; border-radius: 6px; overflow: hidden; }
#co-brand-color-picker::-webkit-color-swatch         { border: none; border-radius: 6px; }
#co-brand-color-picker::-moz-color-swatch            { border: none; border-radius: 6px; }
#co-brand-color-picker:focus {
	border-color: #6366F1;
	box-shadow: 0 0 0 3px rgba(99,102,241,.12);
	outline: none;
}
#co-brand-color-hex {
	width: 110px;
	flex-shrink: 0;
	font-family: 'DM Mono', 'Courier New', monospace;
	letter-spacing: 0.05em;
}
.co-logo-preview-wrap {
	margin-top: 10px;
	padding: 10px 14px;
	background: #F9FAFB;
	border: 1.5px dashed #D1D5DB;
	border-radius: 9px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: 100%;
}
.co-logo-preview-label {
	font-size: 11px;
	font-weight: 600;
	color: #9CA3AF;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
#co-logo-preview {
	max-height: 48px;
	max-width: 180px;
	display: block;
}
.co-media-picker-row {
	display: flex;
	align-items: center;
	gap: 14px;
}
.co-btn-secondary {
	display: inline-flex;
	align-items: center;
	height: 38px;
	padding: 0 18px;
	background: #fff;
	color: #1A1A2E;
	border: 1.5px solid #D1D5DB;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.co-btn-secondary:hover { border-color: #6366F1; background: #F9FAFB; }
.co-btn-text {
	background: none;
	border: none;
	padding: 0;
	color: #9CA3AF;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: color .15s;
}
.co-btn-text:hover { color: #EF4444; }
.co-login-bg-preview-img {
	max-height: 140px;
	max-width: 100%;
	border-radius: 6px;
	display: block;
}

/* ── Automated reminders UI ─────────────────────────────────────────── */
.co-auto-card {
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 16px;
	padding: 28px 32px;
	margin-bottom: 20px;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.co-auto-trigger {
	border: 1.5px solid #E5E7EB;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color .15s;
}
.co-auto-trigger.is-enabled {
	border-color: #6366F1;
}
.co-auto-trigger-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	background: #FAFAFA;
	cursor: pointer;
	user-select: none;
}
.co-auto-trigger.is-enabled .co-auto-trigger-header {
	background: #F5F3FF;
}
.co-auto-trigger-icon {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background: #F3F4F6;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s;
}
.co-auto-trigger.is-enabled .co-auto-trigger-icon {
	background: #EDE9FE;
}
.co-auto-trigger-icon svg { display: block; }
.co-auto-trigger-text { flex: 1; min-width: 0; }
.co-auto-trigger-title {
	font-size: 13px;
	font-weight: 700;
	color: #1A1A2E;
	margin: 0 0 2px;
}
.co-auto-trigger-desc {
	font-size: 12px;
	color: #6B7280;
	margin: 0;
	line-height: 1.5;
}
.co-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
}
.co-toggle input { opacity: 0; width: 0; height: 0; }
.co-toggle-slider {
	position: absolute;
	inset: 0;
	background: #D1D5DB;
	border-radius: 22px;
	transition: background .2s;
	cursor: pointer;
}
.co-toggle-slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	top: 3px;
	left: 3px;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.co-toggle input:checked + .co-toggle-slider { background: #6366F1; }
.co-toggle input:checked + .co-toggle-slider::before { transform: translateX(18px); }
.co-toggle input:focus-visible + .co-toggle-slider { outline: 2px solid #6366F1; outline-offset: 2px; }
.co-auto-trigger-body {
	padding: 20px;
	border-top: 1px solid #E5E7EB;
}
.co-auto-trigger.is-enabled .co-auto-trigger-body { border-top-color: #DDD6FE; }
.co-auto-trigger-body .co-field { margin-bottom: 18px; }
.co-auto-trigger-body .co-field:last-child { margin-bottom: 0; }
.co-auto-delay-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.co-auto-delay-row .co-input { width: 80px; flex-shrink: 0; text-align: center; }
.co-auto-delay-row .co-delay-unit { font-size: 13px; color: #6B7280; font-weight: 500; }
.co-auto-trigger-body textarea.co-input {
	height: auto;
	padding: 12px 14px;
	font-family: -apple-system, sans-serif;
	letter-spacing: 0;
	resize: vertical;
}
.co-hint code {
	font-family: 'DM Mono', 'Courier New', monospace;
	font-size: 11px;
	background: #F3F4F6;
	border: 1px solid #E5E7EB;
	border-radius: 4px;
	padding: 1px 5px;
	color: #374151;
}
