.imgsmaller-dashboard {
	--imgsmaller-primary: #2271b1;
	--imgsmaller-primary-600: #1a5a8d;
	--imgsmaller-success: #1f6b27;
	--imgsmaller-success-bg: #edffe6;
	--imgsmaller-danger: #8a1c1c;
	--imgsmaller-danger-bg: #ffeaea;
	--imgsmaller-border: #dcdcde;
	--imgsmaller-surface: #ffffff;
	--imgsmaller-soft: #f6f7f7;
	--imgsmaller-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
	max-width: 1100px;
}

.imgsmaller-status-row,
.imgsmaller-progress-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin: 24px 0;
}

.imgsmaller-dashboard .status-card {
	background: var(--imgsmaller-surface);
	border: 1px solid var(--imgsmaller-border);
	border-radius: 10px;
	padding: 18px 16px;
	box-shadow: var(--imgsmaller-shadow);
}

.imgsmaller-dashboard .status-card h2,
.imgsmaller-dashboard .status-card h3 {
	margin-top: 0;
}

.imgsmaller-status-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 13px;
}

.imgsmaller-status-badge--connected { background: var(--imgsmaller-success-bg); color: var(--imgsmaller-success); }

.imgsmaller-status-badge--disconnected { background: var(--imgsmaller-danger-bg); color: var(--imgsmaller-danger); }

.imgsmaller-metric {
	font-size: 32px;
	font-weight: 700;
	margin: 0;
}

.imgsmaller-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 24px;
}

.imgsmaller-restore-progress {
	flex: 1 1 280px;
	min-width: 260px;
	background: var(--imgsmaller-surface);
	border: 1px solid var(--imgsmaller-border);
	border-radius: 10px;
	padding: 12px 16px;
	box-shadow: var(--imgsmaller-shadow);
	max-width: 420px;
}

.imgsmaller-restore-progress .imgsmaller-progress-bar {
	margin-top: 8px;
}

.imgsmaller-restore-progress .js-restore-progress-text {
	font-weight: 600;
	font-size: 13px;
}

.imgsmaller-progress-overview {
	background: var(--imgsmaller-surface);
	border: 1px solid var(--imgsmaller-border);
	border-radius: 10px;
	padding: 16px;
	box-shadow: var(--imgsmaller-shadow);
	margin-bottom: 24px;
}

.imgsmaller-progress-meta {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	font-weight: 600;
	font-size: 14px;
}

.imgsmaller-progress-bar {
	position: relative;
	width: 100%;
	height: 14px;
	border-radius: 999px;
	background: #f0f0f1;
	overflow: hidden;
	margin-top: 12px;
}

.imgsmaller-progress-bar__fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, var(--imgsmaller-primary) 0%, #2a8dd9 100%); background-size: 200% 100%; animation: imgsmaller-progress 3s linear infinite; transition: width 0.4s ease; }
@keyframes imgsmaller-progress { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

.imgsmaller-inline-form {
	margin: 0;
}

.imgsmaller-inline-form .button {
	margin: 0;
}

.imgsmaller-backup-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 12px;
}

.imgsmaller-backup-tools input[type="file"] {
	margin: 0;
}

.imgsmaller-delete-backups {
	display: flex;
	align-items: center;
}

.imgsmaller-delete-confirm {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-top: 8px;
}

.imgsmaller-delete-confirm input[type="text"] {
	width: 120px;
	text-transform: uppercase;
}

.imgsmaller-backup-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 16px 0 24px;
}

.imgsmaller-backup-import input[type="file"] {
	margin-right: 8px;
}

.imgsmaller-logs {
	margin-top: 32px;
}

.imgsmaller-logs ul { background: var(--imgsmaller-surface); border: 1px solid var(--imgsmaller-border); border-radius: 10px; padding: 16px; max-height: 280px; overflow-y: auto; box-shadow: var(--imgsmaller-shadow); }

.imgsmaller-logs .log-item {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.4;
}

.imgsmaller-logs .log-item strong {
	display: inline-block;
	min-width: 160px;
}

.imgsmaller-logs .log-item--error span {
	color: #8a1c1c;
}

.imgsmaller-logs .log-item--warning span {
	color: #855700;
}

/* Exclude Images Browser */
.imgsmaller-exclude-browser { border: 1px solid var(--imgsmaller-border); padding: 12px; border-radius: 10px; max-width: 720px; background: var(--imgsmaller-surface); box-shadow: var(--imgsmaller-shadow); }

.imgsmaller-exclude-toolbar {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-bottom: 8px;
}

.imgsmaller-exclude-search {
	flex: 1;
}

.imgsmaller-exclude-grid { display: grid; grid-template-columns: repeat( auto-fill, minmax(120px, 1fr) ); gap: 10px; max-height: 360px; overflow: auto; border: 1px solid #eee; border-radius: 8px; padding: 8px; background: var(--imgsmaller-soft); }

.imgsmaller-exclude-item { border: 1px solid #eee; border-radius: 8px; padding: 6px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.03); transition: transform .12s ease, box-shadow .12s ease; }
.imgsmaller-exclude-item:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.06); }
.imgsmaller-exclude-item img { display: block; width: 100%; height: 110px; object-fit: cover; background: #f7f7f7; border-radius: 6px; }

.imgsmaller-exclude-item input[type="checkbox"] {
	display: block;
	margin-top: 6px;
}

.imgsmaller-exclude-loading {
	display: none;
	margin-top: 8px;
}

.imgsmaller-exclude-more {
	margin-top: 8px;
	display: flex;
	justify-content: center;
}

/* Settings form card styling */
.imgsmaller-settings-form { background: var(--imgsmaller-surface); border: 1px solid var(--imgsmaller-border); border-radius: 10px; padding: 16px; box-shadow: var(--imgsmaller-shadow); }
.imgsmaller-settings-form .form-table th { width: 220px; padding: 16px 10px 16px 0; vertical-align: top; }
.imgsmaller-settings-form .form-table td { padding: 12px 0; }

/* Primary button polish */
.imgsmaller-dashboard .button.button-primary { background: var(--imgsmaller-primary); border-color: var(--imgsmaller-primary); box-shadow: 0 1px 0 rgba(0,0,0,.1); }
.imgsmaller-dashboard .button.button-primary:hover,
.imgsmaller-dashboard .button.button-primary:focus { background: var(--imgsmaller-primary-600); border-color: var(--imgsmaller-primary-600); }

/* Onboarding tour overlay */
.imgsmaller-tour-overlay .imgsmaller-tour-card {
	animation: imgsmaller-pop 0.15s ease-out;
}

@keyframes imgsmaller-pop {
	from { transform: translateY(8px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

/* Floating action button for tour */
.imgsmaller-tour-fab {
	background: var(--imgsmaller-primary);
	border-color: var(--imgsmaller-primary);
	color: #fff;
	box-shadow: 0 6px 14px rgba(0,0,0,.12);
}
.imgsmaller-tour-fab:hover,
.imgsmaller-tour-fab:focus {
	background: var(--imgsmaller-primary-600);
	border-color: var(--imgsmaller-primary-600);
	color: #fff;
}
