/**
 * Ahtesham Speed Optimizer - Admin Styles
 */

.aso-admin-wrap {
	max-width: 1200px;
	margin: 20px 20px 40px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1e1e1e;
}

.aso-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #ffffff;
	padding: 24px 30px;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin-bottom: 24px;
	border-left: 5px solid #2271b1;
}

.aso-header-title h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	color: #1d2327;
}

.aso-header-title p {
	margin: 5px 0 0;
	color: #646970;
	font-size: 14px;
}

.aso-header-actions {
	display: flex;
	gap: 10px;
}

/* Preset Cards */
.aso-presets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-bottom: 24px;
}

.aso-preset-card {
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 10px;
	padding: 20px;
	transition: all 0.2s ease;
	position: relative;
	cursor: pointer;
}

.aso-preset-card:hover {
	border-color: #2271b1;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.aso-preset-card.active {
	border-color: #2271b1;
	background: #f0f6fc;
}

.aso-preset-card h3 {
	margin: 0 0 8px;
	font-size: 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.aso-preset-badge {
	font-size: 11px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
}

.aso-badge-safe { background: #d1e7dd; color: #0f5132; }
.aso-badge-balanced { background: #cfe2ff; color: #084298; }
.aso-badge-custom { background: #e2e3e5; color: #41464b; }

.aso-preset-card p {
	color: #50575e;
	font-size: 13px;
	margin: 0 0 16px;
	line-height: 1.4;
}

/* Tabs Navigation */
.aso-tabs-nav {
	display: flex;
	gap: 4px;
	background: #ffffff;
	padding: 8px 12px 0;
	border-radius: 10px 10px 0 0;
	border-bottom: 2px solid #dcdcde;
}

.aso-tab-link {
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 600;
	color: #646970;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: all 0.2s ease;
}

.aso-tab-link:hover {
	color: #2271b1;
}

.aso-tab-link.active {
	color: #2271b1;
	border-bottom-color: #2271b1;
}

/* Tab Content Box */
.aso-tab-content-wrap {
	background: #ffffff;
	padding: 30px;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	margin-bottom: 24px;
}

.aso-tab-pane {
	display: none;
}

.aso-tab-pane.active {
	display: block;
}

/* Settings Form Groups */
.aso-setting-group {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding: 20px 0;
	border-bottom: 1px solid #f0f0f1;
}

.aso-setting-group:last-child {
	border-bottom: none;
}

.aso-setting-info {
	max-width: 68%;
}

.aso-setting-info h4 {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.aso-setting-info p {
	margin: 0;
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
}

/* Custom Switch Toggle */
.aso-switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 26px;
	flex-shrink: 0;
}

.aso-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.aso-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: #c3c4c7;
	transition: 0.3s;
	border-radius: 26px;
}

.aso-slider:before {
	position: absolute;
	content: "";
	height: 20px;
	width: 20px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

input:checked + .aso-slider {
	background-color: #2271b1;
}

input:checked + .aso-slider:before {
	transform: translateX(22px);
}

/* Diagnostics Table */
.aso-diag-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.aso-diag-table th, .aso-diag-table td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid #f0f0f1;
}

.aso-diag-table th {
	background: #f6f7f7;
	font-weight: 600;
}

.aso-status-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.aso-status-pass { background: #d1e7dd; color: #0f5132; }
.aso-status-warning { background: #fff3cd; color: #664d03; }
.aso-status-fail { background: #f8d7da; color: #842029; }
.aso-status-info { background: #cff4fc; color: #055160; }

/* Alert Box */
.aso-alert {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
}
.aso-alert-info { background: #e7f5ff; border-left: 4px solid #1c7ed6; color: #1864ab; }
.aso-alert-warning { background: #fff9db; border-left: 4px solid #f59f00; color: #f08c00; }
.aso-alert-success { background: #ebfbee; border-left: 4px solid #40c057; color: #2b8a3e; }

/* Textarea & Inputs */
.aso-textarea {
	width: 100%;
	font-family: monospace;
	font-size: 13px;
	padding: 8px 12px;
	border-radius: 6px;
	border: 1px solid #8c8f94;
	box-sizing: border-box;
}

.aso-save-bar {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 20px;
}
