
/**
 * CIER2E Submissions — Frontend Stylesheet
 *
 * Design system inspired by SureForm: CSS custom properties,
 * modern borders, subtle shadows, badges, transitions.
 */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
	/* Palette */
	--cier2e-primary: #0B6E4F;
	--cier2e-primary-hover: #095a40;
	--cier2e-primary-light: rgba(11, 110, 79, 0.08);
	--cier2e-secondary: #1a1a2e;
	--cier2e-accent: #e94560;
	--cier2e-success: #16a34a;
	--cier2e-success-light: rgba(22, 163, 74, 0.08);
	--cier2e-warning: #f59e0b;
	--cier2e-warning-light: rgba(245, 158, 11, 0.08);
	--cier2e-danger: #dc2626;
	--cier2e-danger-light: rgba(220, 38, 38, 0.08);
	--cier2e-info: #3b82f6;
	--cier2e-info-light: rgba(59, 130, 246, 0.08);

	/* Surfaces */
	--cier2e-bg: #f8fafc;
	--cier2e-surface: #ffffff;
	--cier2e-border: #e2e8f0;
	--cier2e-border-hover: #cbd5e1;
	--cier2e-border-focus: rgba(11, 110, 79, 0.5);
	--cier2e-border-focus-glow: rgba(11, 110, 79, 0.15);

	/* Text */
	--cier2e-text: #1e293b;
	--cier2e-text-secondary: #64748b;
	--cier2e-text-muted: #94a3b8;

	/* Typography */
	--cier2e-font: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--cier2e-font-size: 14px;
	--cier2e-font-size-sm: 12px;
	--cier2e-font-size-lg: 16px;
	--cier2e-font-size-xl: 20px;
	--cier2e-font-size-2xl: 28px;
	--cier2e-label-weight: 500;
	--cier2e-heading-weight: 600;

	/* Spacing & Radius */
	--cier2e-radius: 8px;
	--cier2e-radius-sm: 6px;
	--cier2e-radius-lg: 12px;
	--cier2e-radius-full: 9999px;
	--cier2e-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
	--cier2e-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--cier2e-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
	--cier2e-transition: 0.2s ease;
}

/* ============================================
   RESET
   ============================================ */

.cier2e-dashboard *,
.cier2e-submit-page *,
.cier2e-login-page *,
.cier2e-login-required * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

.cier2e-dashboard,
.cier2e-submit-page,
.cier2e-login-page {
	font-family: var(--cier2e-font);
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text);
	line-height: 1.6;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 48px;
}

/* ============================================
   CARDS
   ============================================ */

.cier2e-card {
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow);
	overflow: hidden;
}

.cier2e-card__header {
	padding: 24px 28px 16px;
	border-bottom: 1px solid var(--cier2e-border);
}

.cier2e-card__header h2,
.cier2e-card__header h3 {
	font-size: var(--cier2e-font-size-lg);
	font-weight: var(--cier2e-heading-weight);
	color: var(--cier2e-text);
	display: flex;
	align-items: center;
	gap: 8px;
}

.cier2e-card__description {
	color: var(--cier2e-text-secondary);
	margin-top: 4px;
	font-size: var(--cier2e-font-size);
}

/* ============================================
   BUTTONS
   ============================================ */

.cier2e-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 20px;
	font-family: var(--cier2e-font);
	font-size: var(--cier2e-font-size);
	font-weight: 500;
	line-height: 1.4;
	border-radius: var(--cier2e-radius-full);
	border: 1px solid transparent;
	cursor: pointer;
	transition: all var(--cier2e-transition);
	text-decoration: none;
	white-space: nowrap;
}

.cier2e-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px var(--cier2e-border-focus-glow);
}

.cier2e-btn--primary {
	background: var(--cier2e-primary);
	color: #ffffff;
	border-color: var(--cier2e-primary);
}

.cier2e-btn--primary:hover {
	background: var(--cier2e-primary-hover);
	border-color: var(--cier2e-primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--cier2e-shadow-md);
}

.cier2e-btn--outline {
	background: transparent;
	color: var(--cier2e-text);
	border-color: var(--cier2e-border);
}

.cier2e-btn--outline:hover {
	background: var(--cier2e-bg);
	border-color: var(--cier2e-border-hover);
}

.cier2e-btn--ghost {
	background: transparent;
	color: var(--cier2e-text-secondary);
	border-color: transparent;
	padding: 8px 12px;
}

.cier2e-btn--ghost:hover {
	background: var(--cier2e-bg);
	color: var(--cier2e-text);
}

.cier2e-btn--sm {
	padding: 6px 12px;
	font-size: var(--cier2e-font-size-sm);
}

.cier2e-btn--lg {
	padding: 12px 28px;
	font-size: var(--cier2e-font-size-lg);
}

.cier2e-btn--full {
	width: 100%;
	justify-content: center;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.cier2e-form {
	padding: 24px 28px 28px;
}

.cier2e-form-group {
	margin-bottom: 20px;
}

.cier2e-form-group--inline {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cier2e-label {
	display: block;
	font-size: var(--cier2e-font-size);
	font-weight: var(--cier2e-label-weight);
	color: var(--cier2e-text);
	margin-bottom: 6px;
}

.cier2e-required {
	color: var(--cier2e-danger);
	margin-left: 2px;
}

.cier2e-input,
.cier2e-textarea {
	width: 100%;
	padding: 10px 14px;
	font-family: var(--cier2e-font);
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text);
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-sm);
	transition: all var(--cier2e-transition);
	line-height: 1.5;
}

.cier2e-input:hover,
.cier2e-textarea:hover {
	border-color: var(--cier2e-border-hover);
}

.cier2e-input:focus,
.cier2e-textarea:focus {
	outline: none;
	border-color: var(--cier2e-border-focus);
	box-shadow: 0 0 0 3px var(--cier2e-border-focus-glow);
}

.cier2e-textarea {
	resize: vertical;
	min-height: 140px;
}

.cier2e-password-wrap {
	position: relative;
}

.cier2e-password-wrap .cier2e-input {
	padding-right: 42px;
}

.cier2e-password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--cier2e-text-muted);
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color var(--cier2e-transition);
}

.cier2e-password-toggle:hover {
	color: var(--cier2e-primary);
}

.cier2e-password-toggle .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.cier2e-help-text {
	display: block;
	margin-top: 4px;
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-muted);
}

.cier2e-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text);
}

.cier2e-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--cier2e-primary);
}

.cier2e-link {
	color: var(--cier2e-primary);
	text-decoration: none;
	font-weight: 500;
	transition: color var(--cier2e-transition);
}

.cier2e-link:hover {
	color: var(--cier2e-primary-hover);
	text-decoration: underline;
}

.cier2e-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding-top: 8px;
	border-top: 1px solid var(--cier2e-border);
	margin-top: 24px;
	padding-top: 24px;
}

/* ============================================
   FIELDSET & FORM ROW
   ============================================ */

.cier2e-fieldset {
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius);
	padding: 20px 24px;
	margin-bottom: 20px;
	background: var(--cier2e-bg);
}

.cier2e-fieldset__legend {
	font-size: var(--cier2e-font-size);
	font-weight: var(--cier2e-heading-weight);
	color: var(--cier2e-text);
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 0 8px;
}

.cier2e-fieldset__legend .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	color: var(--cier2e-primary);
}

.cier2e-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.cier2e-form-group--half {
	margin-bottom: 20px;
}

/* ============================================
   RADIO GROUP (card style)
   ============================================ */

.cier2e-radio-group {
	display: flex;
	gap: 12px;
}

.cier2e-radio {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
	flex: 1;
	background: var(--cier2e-surface);
	border: 2px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius);
	cursor: pointer;
	transition: all var(--cier2e-transition);
	position: relative;
}

.cier2e-radio:hover {
	border-color: var(--cier2e-border-hover);
	background: var(--cier2e-bg);
}

.cier2e-radio input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--cier2e-primary);
	cursor: pointer;
	flex-shrink: 0;
}

.cier2e-radio input[type="radio"]:checked + .cier2e-radio__mark + .cier2e-radio__label {
	color: var(--cier2e-primary);
	font-weight: 600;
}

.cier2e-radio:has(input[type="radio"]:checked) {
	border-color: var(--cier2e-primary);
	background: var(--cier2e-primary-light);
}

.cier2e-radio__mark {
	display: none;
}

.cier2e-radio__label {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text);
	transition: all var(--cier2e-transition);
}

.cier2e-radio__icon {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

/* ============================================
   DROPZONE
   ============================================ */

.cier2e-dropzone {
	position: relative;
	border: 2px dashed var(--cier2e-border);
	border-radius: var(--cier2e-radius);
	padding: 40px 24px;
	text-align: center;
	transition: all var(--cier2e-transition);
	cursor: pointer;
	background: var(--cier2e-bg);
}

.cier2e-dropzone:hover,
.cier2e-dropzone.is-dragover {
	border-color: var(--cier2e-primary);
	background: var(--cier2e-primary-light);
}

.cier2e-dropzone__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.cier2e-dropzone__icon {
	font-size: 40px;
	color: var(--cier2e-primary);
	display: block;
	margin-bottom: 8px;
}

.cier2e-dropzone__text {
	font-weight: 500;
	color: var(--cier2e-text);
	margin-bottom: 4px;
}

.cier2e-dropzone__subtext {
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-muted);
}

.cier2e-dropzone__files {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cier2e-dropzone__file-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-sm);
	font-size: var(--cier2e-font-size);
	transition: border-color var(--cier2e-transition);
}

.cier2e-dropzone__file-row:hover {
	border-color: var(--cier2e-border-hover);
}

.cier2e-dropzone__file-icon {
	color: var(--cier2e-primary);
	font-size: 18px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.cier2e-dropzone__file-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: var(--cier2e-text);
	font-weight: 500;
}

.cier2e-dropzone__file-size {
	flex-shrink: 0;
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-muted);
	background: var(--cier2e-bg);
	padding: 2px 8px;
	border-radius: 10px;
}

.cier2e-dropzone__file-remove {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--cier2e-text-muted);
	cursor: pointer;
	padding: 2px;
	border-radius: 50%;
	transition: all var(--cier2e-transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-dropzone__file-remove .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.cier2e-dropzone__file-remove:hover {
	color: var(--cier2e-danger);
	background: var(--cier2e-danger-light);
}

/* ============================================
   BADGES
   ============================================ */

.cier2e-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	font-size: var(--cier2e-font-size-sm);
	font-weight: 600;
	border-radius: var(--cier2e-radius-full);
	line-height: 1.5;
	white-space: nowrap;
}

.cier2e-badge--success {
	background: var(--cier2e-success-light);
	color: var(--cier2e-success);
}

.cier2e-badge--warning {
	background: var(--cier2e-warning-light);
	color: #b45309;
}

.cier2e-badge--danger {
	background: var(--cier2e-danger-light);
	color: var(--cier2e-danger);
}

.cier2e-badge--info {
	background: var(--cier2e-info-light);
	color: var(--cier2e-info);
}

.cier2e-badge--dot {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 10px;
	font-weight: 700;
	background: var(--cier2e-danger);
	color: #fff;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ============================================
   ALERTS
   ============================================ */

.cier2e-alert {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 18px;
	border-radius: var(--cier2e-radius);
	margin-bottom: 20px;
	font-size: var(--cier2e-font-size);
	line-height: 1.5;
}

.cier2e-alert--success {
	background: var(--cier2e-success-light);
	color: #166534;
	border: 1px solid rgba(22, 163, 74, 0.2);
}

.cier2e-alert--danger {
	background: var(--cier2e-danger-light);
	color: #991b1b;
	border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ============================================
   DASHBOARD
   ============================================ */

.cier2e-dashboard__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 28px;
	flex-wrap: wrap;
	gap: 16px;
}

.cier2e-dashboard__welcome {
	display: flex;
	align-items: center;
	gap: 14px;
}

.cier2e-avatar img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 2px solid var(--cier2e-border);
}

.cier2e-dashboard__title {
	font-size: var(--cier2e-font-size-xl);
	font-weight: var(--cier2e-heading-weight);
	margin-bottom: 2px;
}

.cier2e-dashboard__subtitle {
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text-secondary);
}

.cier2e-dashboard__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

#cier2e-notif-toggle {
	position: relative;
}

.cier2e-dashboard__footer {
	margin-top: 32px;
	text-align: center;
}

/* Stats Grid */
.cier2e-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}

.cier2e-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px;
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow);
	transition: all var(--cier2e-transition);
}

.cier2e-stat-card:hover {
	box-shadow: var(--cier2e-shadow-md);
	transform: translateY(-2px);
}

.cier2e-stat-card__icon {
	width: 44px;
	height: 44px;
	border-radius: var(--cier2e-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cier2e-stat-card__icon .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.cier2e-stat-card__icon--primary { background: var(--cier2e-primary-light); color: var(--cier2e-primary); }
.cier2e-stat-card__icon--warning { background: var(--cier2e-warning-light); color: #b45309; }
.cier2e-stat-card__icon--success { background: var(--cier2e-success-light); color: var(--cier2e-success); }
.cier2e-stat-card__icon--danger  { background: var(--cier2e-danger-light); color: var(--cier2e-danger); }

.cier2e-stat-card__number {
	display: block;
	font-size: var(--cier2e-font-size-2xl);
	font-weight: 700;
	line-height: 1;
	color: var(--cier2e-text);
}

.cier2e-stat-card__label {
	display: block;
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-secondary);
	margin-top: 2px;
}

/* ============================================
   TABLE
   ============================================ */

.cier2e-table-responsive {
	overflow-x: auto;
}

.cier2e-table {
	width: 100%;
	border-collapse: collapse;
}

.cier2e-table th {
	text-align: left;
	padding: 12px 16px;
	font-size: var(--cier2e-font-size-sm);
	font-weight: 600;
	color: var(--cier2e-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	background: var(--cier2e-bg);
	border-bottom: 1px solid var(--cier2e-border);
	white-space: nowrap;
}

.cier2e-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--cier2e-border);
	font-size: var(--cier2e-font-size);
	vertical-align: middle;
}

.cier2e-table tbody tr:hover {
	background: var(--cier2e-bg);
}

.cier2e-table tbody tr:nth-child(even) {
	background: rgba(248, 250, 252, 0.5);
}

.cier2e-table tbody tr:nth-child(even):hover {
	background: var(--cier2e-bg);
}

.cier2e-table__notes {
	margin-top: 4px;
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-muted);
	font-style: italic;
}

.cier2e-file-indicator {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-secondary);
}

.cier2e-text-muted {
	color: var(--cier2e-text-muted);
}

/* ============================================
   NOTIFICATION PANEL
   ============================================ */

.cier2e-notif-panel {
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow-lg);
	margin-bottom: 20px;
	overflow: hidden;
}

.cier2e-notif-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--cier2e-border);
}

.cier2e-notif-panel__header h4 {
	font-size: var(--cier2e-font-size);
	font-weight: 600;
}

.cier2e-notif-item {
	display: flex;
	gap: 12px;
	padding: 14px 20px;
	border-bottom: 1px solid var(--cier2e-border);
	transition: background var(--cier2e-transition);
}

.cier2e-notif-item:last-child {
	border-bottom: none;
}

.cier2e-notif-item:hover {
	background: var(--cier2e-bg);
}

.cier2e-notif-item--unread {
	background: var(--cier2e-primary-light);
}

.cier2e-notif-item__icon {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--cier2e-bg);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-notif-item__icon .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--cier2e-primary);
}

.cier2e-notif-item__content p {
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text);
	margin-bottom: 2px;
}

.cier2e-notif-item__content time {
	font-size: var(--cier2e-font-size-sm);
	color: var(--cier2e-text-muted);
}

.cier2e-notif-empty {
	padding: 24px;
	text-align: center;
	color: var(--cier2e-text-muted);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.cier2e-empty-state {
	text-align: center;
	padding: 48px 24px;
}

.cier2e-empty-state__icon {
	font-size: 48px;
	color: var(--cier2e-text-muted);
	margin-bottom: 12px;
}

.cier2e-empty-state__icon .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
}

.cier2e-empty-state h4 {
	font-size: var(--cier2e-font-size-lg);
	font-weight: 600;
	margin-bottom: 8px;
}

.cier2e-empty-state p {
	color: var(--cier2e-text-secondary);
	margin-bottom: 20px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.cier2e-login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
}

.cier2e-login-card {
	width: 100%;
	max-width: 420px;
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow-md);
	overflow: hidden;
}

.cier2e-login-card__header {
	text-align: center;
	padding: 32px 28px 20px;
}

.cier2e-login-card__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: var(--cier2e-primary-light);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-login-card__icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: var(--cier2e-primary);
}

.cier2e-login-card__header h2 {
	font-size: var(--cier2e-font-size-xl);
	font-weight: var(--cier2e-heading-weight);
	margin-bottom: 4px;
}

.cier2e-login-card__header p {
	color: var(--cier2e-text-secondary);
	font-size: var(--cier2e-font-size);
}

.cier2e-login-card .cier2e-alert {
	margin: 0 28px;
}

.cier2e-login-card .cier2e-form {
	padding: 20px 28px 28px;
}

.cier2e-login-card__footer {
	text-align: center;
	padding: 16px 28px 24px;
	font-size: var(--cier2e-font-size);
	color: var(--cier2e-text-secondary);
}

/* ============================================
   LOGIN REQUIRED
   ============================================ */

.cier2e-login-required {
	text-align: center;
	padding: 48px 24px;
	max-width: 400px;
	margin: 0 auto;
}

.cier2e-login-required__icon {
	font-size: 48px;
	margin-bottom: 16px;
}

.cier2e-login-required h3 {
	font-size: var(--cier2e-font-size-xl);
	font-weight: 600;
	margin-bottom: 8px;
}

.cier2e-login-required p {
	color: var(--cier2e-text-secondary);
	margin-bottom: 20px;
}

/* ============================================
   LOADING / SPINNER
   ============================================ */

.cier2e-loading {
	text-align: center;
	padding: 48px;
	color: var(--cier2e-text-muted);
}

.cier2e-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--cier2e-border);
	border-top-color: var(--cier2e-primary);
	border-radius: 50%;
	margin: 0 auto 12px;
	animation: cier2e-spin 0.8s linear infinite;
}

@keyframes cier2e-spin {
	to { transform: rotate(360deg); }
}

.cier2e-spinner--inline {
	width: 16px;
	height: 16px;
	border-width: 2px;
	display: inline-block;
	vertical-align: middle;
	margin: 0 6px 0 0;
}

.cier2e-field-error {
	color: var(--cier2e-danger);
	font-size: 13px;
	margin: 8px 0 0;
	font-weight: 500;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
	.cier2e-dashboard__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.cier2e-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.cier2e-form-actions {
		flex-direction: column;
	}

	.cier2e-form-actions .cier2e-btn {
		width: 100%;
		justify-content: center;
	}

	.cier2e-form-group--inline {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.cier2e-form-row {
		grid-template-columns: 1fr;
	}

	.cier2e-radio-group {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.cier2e-dashboard,
	.cier2e-submit-page,
	.cier2e-login-page {
		padding: 16px 8px 32px;
	}

	.cier2e-login-card,
	.cier2e-submit-card {
		max-width: 100%;
		border-radius: 12px;
	}

	.cier2e-login-card__header,
	.cier2e-submit-card .cier2e-card__header {
		padding: 20px 16px;
	}

	.cier2e-login-card__header h2 {
		font-size: 20px;
	}

	.cier2e-login-card__header p {
		font-size: 13px;
	}

	.cier2e-form {
		padding: 16px;
	}

	/* Bigger touch targets for inputs & selects */
	.cier2e-input,
	.cier2e-textarea,
	select.cier2e-input {
		padding: 12px 14px;
		font-size: 16px; /* Prevents iOS zoom on focus */
		min-height: 44px;
		box-sizing: border-box;
	}

	.cier2e-password-wrap .cier2e-input {
		padding-right: 44px;
	}

	.cier2e-label {
		font-size: 13px;
	}

	.cier2e-stats-grid {
		grid-template-columns: 1fr;
	}

	.cier2e-stat-card {
		padding: 16px;
	}

	.cier2e-card__header {
		padding: 16px 20px 12px;
	}

	.cier2e-table th,
	.cier2e-table td {
		padding: 10px 12px;
	}

	.cier2e-fieldset {
		padding: 14px;
	}
}

/* ============================================
   TOAST (frontend)
   ============================================ */

.cier2e-toast {
	position: fixed;
	top: 40px;
	right: 24px;
	z-index: 100001;
	padding: 14px 20px;
	background: var(--cier2e-surface);
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius);
	box-shadow: var(--cier2e-shadow-lg);
	font-family: var(--cier2e-font);
	font-size: 13px;
	color: var(--cier2e-text);
	display: flex;
	align-items: center;
	gap: 8px;
	animation: cier2e-toast-in 0.3s ease;
	max-width: 380px;
}

.cier2e-toast--success { border-left: 3px solid var(--cier2e-success); }
.cier2e-toast--error   { border-left: 3px solid var(--cier2e-danger); }

@keyframes cier2e-toast-in {
	from { opacity: 0; transform: translateX(20px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   CONFIRM MODAL (frontend)
   ============================================ */

.cier2e-confirm-overlay {
	position: fixed;
	inset: 0;
	z-index: 100002;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-confirm-box {
	background: var(--cier2e-surface);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow-lg);
	padding: 32px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	animation: cier2e-modal-in 0.25s ease;
}

.cier2e-confirm-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 16px;
	background: var(--cier2e-warning-light);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-confirm-icon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
	color: #b45309;
}

.cier2e-confirm-msg {
	font-family: var(--cier2e-font);
	font-size: 15px;
	color: var(--cier2e-text);
	margin-bottom: 24px;
	line-height: 1.5;
}

.cier2e-confirm-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
}

/* ============================================
   MODAL (shared frontend)
   ============================================ */

.cier2e-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cier2e-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.cier2e-modal__content {
	position: relative;
	width: 90%;
	max-width: 680px;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--cier2e-surface);
	border-radius: var(--cier2e-radius-lg);
	box-shadow: var(--cier2e-shadow-lg);
	padding: 32px;
	animation: cier2e-modal-in 0.25s ease;
}

@keyframes cier2e-modal-in {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.cier2e-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	font-size: 20px;
	line-height: 1;
	background: var(--cier2e-bg);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cier2e-text-muted);
	transition: all var(--cier2e-transition);
}

.cier2e-modal__close:hover {
	background: var(--cier2e-danger-light);
	color: var(--cier2e-danger);
}

/* ============================================
   ACTION BUTTONS & DANGER BUTTON
   ============================================ */

.cier2e-action-btns {
	display: flex;
	gap: 6px;
}

.cier2e-btn--danger {
	background: var(--cier2e-danger);
	color: #fff;
	border-color: var(--cier2e-danger);
}

.cier2e-btn--danger:hover {
	background: #b91c1c;
	border-color: #b91c1c;
}

/* ============================================
   FORM ROW & FIELDSET
   ============================================ */

.cier2e-form-row {
	display: flex;
	gap: 16px;
}

.cier2e-form-group--half {
	flex: 1;
}

.cier2e-fieldset {
	border: 1px solid var(--cier2e-border);
	border-radius: var(--cier2e-radius);
	padding: 20px;
	margin: 0 0 20px;
}

.cier2e-fieldset__legend {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--cier2e-text);
	padding: 0 8px;
}

.cier2e-fieldset__legend .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--cier2e-primary);
}

@media (max-width: 600px) {
	.cier2e-form-row {
		flex-direction: column;
		gap: 0;
	}
}
