/* SecuBox Admin - Enhanced SecuBox Theme */

:root {
	/* SecuBox Brand Colors */
	--sb-primary: #6366f1;
	--sb-primary-light: #818cf8;
	--sb-primary-dark: #4f46e5;
	--sb-secondary: #8b5cf6;
	--sb-secondary-light: #a78bfa;
	--sb-accent: #3b82f6;
	--sb-accent-cyan: #06b6d4;
	--sb-success: #10b981;
	--sb-warning: #f59e0b;
	--sb-danger: #ef4444;

	/* Backgrounds */
	--sb-bg: #f9fafb;
	--sb-bg-secondary: #ffffff;
	--sb-bg-tertiary: #f3f4f6;

	/* Text */
	--sb-text: #1f2937;
	--sb-text-secondary: #6b7280;
	--sb-text-dim: #9ca3af;

	/* Borders */
	--sb-border: #e5e7eb;
	--sb-border-light: #f3f4f6;

	/* Gradients */
	--sb-gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
	--sb-gradient-accent: linear-gradient(135deg, #3b82f6, #06b6d4);
}

/* Dashboard */
.secubox-admin-dashboard h2 {
	margin-bottom: 1.5rem;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.health-summary {
	margin-bottom: 2rem;
}

.health-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
}

.health-item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.health-label {
	font-weight: 600;
	color: var(--sb-text-secondary);
	font-size: 0.875rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.health-value {
	font-weight: 700;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	text-align: right;
	font-size: 1.25rem;
}

.alerts-section {
	margin-bottom: 2rem;
}

.alerts-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.quick-actions {
	margin-bottom: 2rem;
}

.actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1rem;
}

.actions-grid .btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1.25rem;
	background: rgba(99, 102, 241, 0.08);
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 10px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.actions-grid .btn:hover {
	background: rgba(99, 102, 241, 0.12);
	border-color: rgba(139, 92, 246, 0.4);
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
	transform: translateY(-4px);
}

.actions-grid .icon {
	font-size: 2.5rem;
	filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
}

/* Apps Manager */
.secubox-apps-manager h2 {
	margin-bottom: 1.5rem;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.app-filters {
	display: flex;
	gap: 1rem;
	margin-bottom: 2rem;
}

.search-box {
	flex: 1;
	padding: 0.75rem 1.25rem;
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 10px;
	font-size: 0.875rem;
	background: var(--sb-bg-secondary);
	transition: all 0.3s ease;
}

.search-box:focus {
	outline: none;
	border-color: var(--sb-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.category-filter {
	padding: 0.75rem 1.25rem;
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 10px;
	font-size: 0.875rem;
	min-width: 150px;
	background: var(--sb-bg-secondary);
	transition: all 0.3s ease;
}

.category-filter:focus {
	outline: none;
	border-color: var(--sb-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.apps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 1.5rem;
}

.app-card {
	background: var(--sb-bg-secondary);
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 12px;
	padding: 1.75rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: relative;
	overflow: hidden;
}

.app-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--sb-gradient-primary);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.app-card:hover {
	box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
	transform: translateY(-6px);
	border-color: rgba(139, 92, 246, 0.3);
}

.app-card:hover::before {
	opacity: 1;
}

.app-icon {
	font-size: 3.5rem;
	text-align: center;
	filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.2));
}

.app-info h3 {
	margin: 0 0 0.5rem 0;
	font-size: 1.25rem;
	color: var(--sb-text);
	font-weight: 700;
}

.app-description {
	color: var(--sb-text-secondary);
	font-size: 0.875rem;
	line-height: 1.6;
	margin: 0 0 0.75rem 0;
}

.app-meta {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	align-items: center;
}

.app-category {
	background: rgba(99, 102, 241, 0.1);
	color: var(--sb-primary);
	padding: 0.35rem 0.85rem;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 600;
	border: 1px solid rgba(99, 102, 241, 0.2);
}

.app-version {
	background: var(--sb-bg-tertiary);
	color: var(--sb-text-secondary);
	padding: 0.35rem 0.85rem;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 600;
}

.app-actions {
	display: flex;
	gap: 0.75rem;
	margin-top: auto;
}

.app-actions .btn {
	flex: 1;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-actions .btn-primary {
	background: var(--sb-gradient-primary);
	color: white;
	border: none;
}

.app-actions .btn-primary:hover {
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
	transform: translateY(-2px);
}

/* Settings */
.secubox-settings h2 {
	margin-bottom: 1.5rem;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.settings-list {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.settings-card {
	padding: 1.75rem;
	background: var(--sb-bg-secondary);
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 12px;
	transition: all 0.3s ease;
}

.settings-card:hover {
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
	border-color: rgba(139, 92, 246, 0.3);
}

.settings-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.app-title {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.app-title .app-icon {
	font-size: 1.75rem;
	filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.2));
}

.app-title h3 {
	margin: 0;
	font-size: 1.25rem;
	color: var(--sb-text);
	font-weight: 700;
}

.app-controls {
	display: flex;
	gap: 0.75rem;
}

.settings-info {
	color: var(--sb-text-secondary);
	font-size: 0.875rem;
	line-height: 1.6;
}

.settings-info strong {
	color: var(--sb-text);
	font-weight: 600;
}

/* Health */
.secubox-health h2 {
	margin-bottom: 1.5rem;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.health-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.metric-card {
	padding: 1.75rem;
	background: var(--sb-bg-secondary);
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 12px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.metric-card:hover {
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
	transform: translateY(-4px);
	border-color: rgba(139, 92, 246, 0.3);
}

.metric-card h4 {
	margin: 0 0 1rem 0;
	font-size: 0.875rem;
	color: var(--sb-text-secondary);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.metric-value {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.metric-value .value {
	font-size: 2.5rem;
	font-weight: 700;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.metric-value .unit {
	font-size: 1rem;
	color: var(--sb-text-secondary);
	font-weight: 600;
}

.metric-card.success {
	border-left: 4px solid var(--sb-success);
}

.metric-card.success:hover {
	box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

.metric-card.warning {
	border-left: 4px solid var(--sb-warning);
}

.metric-card.warning:hover {
	box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.metric-card.danger {
	border-left: 4px solid var(--sb-danger);
}

.metric-card.danger:hover {
	box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.health-details {
	margin-bottom: 2rem;
}

.health-details .table {
	width: 100%;
	border-collapse: collapse;
	background: var(--sb-bg-secondary);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.health-details .table th,
.health-details .table td {
	padding: 1rem;
	text-align: left;
	border-bottom: 1px solid var(--sb-border);
}

.health-details .table th {
	background: rgba(99, 102, 241, 0.08);
	font-weight: 600;
	color: var(--sb-text);
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
}

.health-details .table tbody tr:hover {
	background: rgba(99, 102, 241, 0.04);
}

/* Logs */
.secubox-logs h2 {
	margin-bottom: 1.5rem;
	background: var(--sb-gradient-primary);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-weight: 700;
}

.logs-controls {
	display: flex;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.service-selector {
	flex: 1;
	min-width: 200px;
	padding: 0.75rem 1.25rem;
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 10px;
	font-size: 0.875rem;
	background: var(--sb-bg-secondary);
	transition: all 0.3s ease;
}

.service-selector:focus {
	outline: none;
	border-color: var(--sb-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.logs-viewer {
	background: #0f0f23;
	color: #e5e7eb;
	padding: 0;
	overflow: hidden;
	border-radius: 12px;
	border: 1px solid rgba(99, 102, 241, 0.2);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.log-content {
	font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	padding: 1.5rem;
	margin: 0;
	overflow-x: auto;
	overflow-y: auto;
	max-height: 600px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* Global Enhancements */
.card {
	background: var(--sb-bg-secondary);
	border: 1px solid rgba(99, 102, 241, 0.15);
	border-radius: 12px;
	padding: 1.75rem;
	transition: all 0.3s ease;
}

.card:hover {
	box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
	border-color: rgba(139, 92, 246, 0.3);
}

.btn {
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.875rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	border: none;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.btn-primary {
	background: var(--sb-gradient-primary);
	color: white;
}

.btn-primary:hover {
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
	transform: translateY(-2px);
}

.btn-secondary {
	background: rgba(99, 102, 241, 0.1);
	color: var(--sb-primary);
	border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
	background: rgba(99, 102, 241, 0.15);
	border-color: rgba(139, 92, 246, 0.5);
}

.btn-danger {
	background: var(--sb-danger);
	color: white;
}

.btn-danger:hover {
	box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
	transform: translateY(-2px);
}

/* Progress bars */
.progress {
	height: 10px;
	background: rgba(99, 102, 241, 0.1);
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid rgba(99, 102, 241, 0.2);
}

.progress-bar {
	height: 100%;
	background: var(--sb-gradient-primary);
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
	border-radius: 6px;
	position: relative;
}

.progress-bar::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(200%); }
}

/* Badges */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.35rem 0.85rem;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 8px;
}

.badge-primary {
	background: rgba(99, 102, 241, 0.1);
	color: var(--sb-primary);
	border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-success {
	background: rgba(16, 185, 129, 0.1);
	color: var(--sb-success);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
	background: rgba(245, 158, 11, 0.1);
	color: var(--sb-warning);
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
	background: rgba(239, 68, 68, 0.1);
	color: var(--sb-danger);
	border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
	.stats-grid,
	.health-cards {
		grid-template-columns: 1fr;
	}

	.apps-grid {
		grid-template-columns: 1fr;
	}

	.app-filters {
		flex-direction: column;
	}

	.settings-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.actions-grid {
		grid-template-columns: 1fr;
	}

	.logs-controls {
		flex-direction: column;
	}
}
