/* SecuBox Control Center UI - regenerated to match design brief */

:root {
	--sb-bg: var(--sh-bg-primary);
	--sb-panel: var(--sh-bg-card);
	--sb-border: var(--sh-border);
	--sb-text: var(--sh-text-primary);
	--sb-text-muted: var(--sh-text-secondary);
	--sb-gradient: linear-gradient(135deg, var(--sh-primary), var(--sh-primary-end));
	--sb-gradient-soft: linear-gradient(135deg, rgba(99,102,241,.35), rgba(147,51,234,.35));
	--sb-shadow: var(--sh-shadow);
	--sb-radius: 18px;
	--sb-card-radius: 20px;
	--sb-spacing: 20px;
	--sb-font-mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
}

.secubox-dashboard {
	min-height: 100vh;
	padding: 32px;
	background: radial-gradient(circle at top, rgba(99,102,241,.15), transparent),
		radial-gradient(circle at bottom, rgba(236,72,153,.12), transparent),
		var(--sb-bg);
	color: var(--sb-text);
	font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header */
.sb-header {
	background: var(--sb-gradient);
	border-radius: var(--sb-card-radius);
	padding: 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	box-shadow: var(--sb-shadow);
}

.sb-header-info {
	display: flex;
	align-items: center;
	gap: 18px;
}

.sb-header-icon {
	width: 64px;
	height: 64px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
}

.sb-title {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
}

.sb-subtitle {
	margin: 4px 0 0;
	color: rgba(255,255,255,.85);
	font-size: 14px;
}

.sb-header-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.sb-badge {
	background: rgba(255,255,255,0.2);
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid rgba(255,255,255,0.35);
}

.sb-badge-ghost {
	background: rgba(255,255,255,0.1);
}

/* Stats */
.sb-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin: 28px 0;
}

.sb-stat-card {
	background: var(--sb-panel);
	border-radius: var(--sb-card-radius);
	padding: 18px 22px;
	border: 1px solid var(--sb-border);
	box-shadow: 0 12px 25px rgba(0,0,0,0.35);
	display: flex;
	align-items: center;
	gap: 16px;
}

.sb-stat-icon {
	font-size: 28px;
}

.sb-stat-value {
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
}

.sb-stat-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--sb-text-muted);
}

/* Layout */
.sb-main-grid {
	display: grid;
	grid-template-columns: 1.3fr 0.7fr;
	gap: 26px;
}

.sb-grid-left,
.sb-grid-right {
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.sb-card {
	background: var(--sb-panel);
	border-radius: var(--sb-card-radius);
	padding: 24px;
	border: 1px solid var(--sb-border);
	box-shadow: var(--sb-shadow);
}

.sb-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}

.sb-card-header h2 {
	margin: 0;
	font-size: 20px;
}

.sb-card-subtitle {
	margin: 4px 0 0;
	color: var(--sb-text-muted);
	font-size: 14px;
}

.sb-module-tabs {
	margin-left: auto;
}

.sb-module-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.sb-module-card {
	background: rgba(8,10,17,0.85);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 18px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.sb-module-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.sb-module-icon {
	width: 48px;
	height: 48px;
	border-radius: 16px;
	background: rgba(255,255,255,0.07);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
}

.sb-status-pill {
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.sb-status-active .sb-status-pill {
	background: rgba(34,197,94,0.15);
	color: var(--sh-success);
}

.sb-status-error .sb-status-pill {
	background: rgba(248,113,113,0.18);
	color: var(--sh-danger);
}

.sb-module-meta {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--sb-text-muted);
}

.sb-module-actions {
	display: flex;
	gap: 10px;
}

.sb-btn {
	flex: 1;
	border-radius: 12px;
	padding: 10px 16px;
	background: rgba(255,255,255,0.05);
	color: white;
	border: 1px solid rgba(255,255,255,0.15);
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s;
}

.sb-btn-primary {
	background: rgba(99,102,241,0.25);
	border-color: rgba(99,102,241,0.5);
}

.sb-btn-ghost:hover {
	background: rgba(255,255,255,0.12);
}

.sb-btn-primary:hover {
	background: rgba(99,102,241,0.4);
}

/* Health */
.sb-health-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.sb-health-metric {
	background: rgba(255,255,255,0.03);
	border-radius: 16px;
	padding: 16px;
	border: 1px solid rgba(255,255,255,0.06);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 12px;
}

.sb-health-icon {
	font-size: 26px;
}

.sb-health-label {
	font-weight: 600;
}

.sb-health-detail {
	font-size: 13px;
	color: var(--sb-text-muted);
}

.sb-health-bar {
	grid-column: 2 / span 2;
	height: 6px;
	background: rgba(255,255,255,0.08);
	border-radius: 999px;
	overflow: hidden;
}

.sb-health-progress {
	height: 100%;
	transition: width 0.3s ease;
}

.sb-ok { background: linear-gradient(90deg, var(--sh-success), #16a34a); }
.sb-warn { background: linear-gradient(90deg, var(--sh-warning), #ea580c); }
.sb-danger { background: linear-gradient(90deg, var(--sh-danger), #dc2626); }

.sb-health-percent {
	font-family: var(--sb-font-mono);
}

/* Quick actions */
.sb-actions-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
}

.sb-action-btn {
	border: none;
	border-radius: 16px;
	padding: 14px;
	font-size: 15px;
	font-weight: 600;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 10px 20px rgba(0,0,0,0.35);
	transition: transform 0.2s;
}

.sb-action-btn:hover {
	transform: translateY(-3px);
}

.sb-action-icon {
	font-size: 22px;
}

.sb-orange { background: linear-gradient(135deg, var(--sh-warning), #f97316); }
.sb-blue { background: linear-gradient(135deg, #38bdf8, var(--sh-primary)); }
.sb-indigo { background: linear-gradient(135deg, #818cf8, var(--sh-primary)); }
.sb-green { background: linear-gradient(135deg, var(--sh-success), #059669); }

/* Alerts */
.sb-alert-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sb-alert-item {
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid rgba(255,255,255,0.08);
	background: rgba(255,255,255,0.02);
	display: flex;
	gap: 18px;
}

.sb-alert-time {
	font-family: var(--sb-font-mono);
	color: var(--sb-text-muted);
	font-size: 13px;
	min-width: 120px;
}

.sb-alert-details strong {
	display: block;
	margin-bottom: 4px;
}

.sb-alert-meta {
	display: inline-block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--sb-text-muted);
}

.sb-info { border-left: 3px solid var(--sh-primary); }
.sb-warning { border-left: 3px solid var(--sh-warning); }
.sb-critical { border-left: 3px solid var(--sh-danger); }

.sb-empty-state {
	text-align: center;
	padding: 40px;
	color: var(--sb-text-muted);
}

.sb-empty-icon {
	font-size: 40px;
	margin-bottom: 12px;
}

/* === Cyberpunk Theme Support === */

[data-secubox-theme="cyberpunk"] .sb-card,
[data-secubox-theme="cyberpunk"] .sb-stat-card,
[data-secubox-theme="cyberpunk"] .sb-module-card {
	background: var(--cyber-bg-secondary);
	border: var(--cyber-border);
	box-shadow: 0 0 20px rgba(102, 126, 234, 0.2);
}

[data-secubox-theme="cyberpunk"] .sb-card:hover,
[data-secubox-theme="cyberpunk"] .sb-stat-card:hover,
[data-secubox-theme="cyberpunk"] .sb-module-card:hover {
	border-color: var(--cyber-accent-primary);
	box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

[data-secubox-theme="cyberpunk"] .sb-header {
	background: var(--cyber-gradient-primary);
	box-shadow: 0 0 40px rgba(102, 126, 234, 0.4);
}

[data-secubox-theme="cyberpunk"] .sb-btn-primary {
	background: var(--cyber-gradient-primary);
	border-color: var(--cyber-accent-primary);
	box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

[data-secubox-theme="cyberpunk"] .sb-btn-primary:hover {
	box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
}

[data-secubox-theme="cyberpunk"] .sb-status-active .sb-status-pill {
	background: var(--cyber-success-soft);
	color: var(--cyber-success);
}

[data-secubox-theme="cyberpunk"] .sb-status-error .sb-status-pill {
	background: var(--cyber-danger-soft);
	color: var(--cyber-danger);
}

[data-secubox-theme="cyberpunk"] .sb-ok {
	background: linear-gradient(90deg, var(--cyber-success), #16a34a);
}

[data-secubox-theme="cyberpunk"] .sb-warn {
	background: linear-gradient(90deg, var(--cyber-warning), #ea580c);
}

[data-secubox-theme="cyberpunk"] .sb-danger {
	background: linear-gradient(90deg, var(--cyber-danger), #dc2626);
}

[data-secubox-theme="cyberpunk"] .sb-info {
	border-left: 3px solid var(--cyber-accent-primary);
}

[data-secubox-theme="cyberpunk"] .sb-warning {
	border-left: 3px solid var(--cyber-warning);
}

[data-secubox-theme="cyberpunk"] .sb-critical {
	border-left: 3px solid var(--cyber-danger);
}

@media (max-width: 1024px) {
	.sb-main-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.secubox-dashboard {
		padding: 20px;
	}

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