/* Sociq WebApps Catalog & Runner Styles */
.apps-container {
	padding: 10px 0 40px;
}

.apps-hero {
	background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
	border-radius: 18px;
	padding: 30px;
	color: #fff;
	margin-bottom: 24px;
	box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.25);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.apps-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(8px);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.apps-hero h1 {
	font-size: 1.8rem;
	font-weight: 800;
	margin: 0 0 6px;
	color: #fff;
}

.apps-hero p {
	color: #e0e7ff;
	margin: 0;
	max-width: 500px;
	font-size: 0.95rem;
}

.apps-search-form {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border-radius: 30px;
	padding: 4px 6px 4px 18px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 380px;
}

.apps-search-icon {
	color: #94a3b8;
	font-size: 1.1rem;
	margin-right: 10px;
}

.apps-search-input {
	border: none;
	outline: none;
	width: 100%;
	font-size: 0.95rem;
	background: transparent;
	color: #0f172a;
}

.apps-search-btn {
	background: #4f46e5;
	color: #fff;
	border: none;
	border-radius: 25px;
	padding: 8px 18px;
	font-weight: 600;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.2s;
}

.apps-search-btn:hover {
	background: #4338ca;
}

.apps-categories-bar {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 8px;
	margin-bottom: 20px;
}

.apps-cat-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	border-radius: 20px;
	background: #fff;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.apps-cat-chip:hover {
	border-color: #cbd5e1;
	color: #1e293b;
	background: #f8fafc;
}

.apps-cat-chip.is-active {
	background: #4f46e5;
	border-color: #4f46e5;
	color: #fff;
	box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

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

.app-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
	border-color: #cbd5e1;
}

.app-card-header {
	display: flex;
	gap: 14px;
	align-items: center;
	margin-bottom: 12px;
}

.app-card-icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	object-fit: cover;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.app-card-meta {
	min-width: 0;
}

.app-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 2px;
	line-height: 1.3;
}

.app-card-title a {
	color: #0f172a;
	text-decoration: none;
}

.app-card-title a:hover {
	color: #4f46e5;
}

.app-card-author {
	font-size: 0.8rem;
	color: #64748b;
}

.app-card-category {
	color: #4f46e5;
	font-weight: 600;
}

.app-card-desc {
	font-size: 0.88rem;
	color: #64748b;
	line-height: 1.45;
	margin-bottom: 16px;
	flex-grow: 1;
}

.app-card-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.app-card-installs {
	font-size: 0.82rem;
	color: #94a3b8;
}

.app-card-launch-btn {
	border-radius: 20px;
	padding: 5px 16px;
	font-weight: 600;
}

/* APP RUNNER */
.app-runner-container {
	background: #0f172a;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	margin-bottom: 30px;
	display: flex;
	flex-direction: column;
}

.app-runner-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 18px;
	background: #1e293b;
	color: #fff;
	border-bottom: 1px solid #334155;
}

.app-runner-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.app-runner-btn-back {
	color: #94a3b8;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.05);
	transition: all 0.2s;
}

.app-runner-btn-back:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
}

.app-runner-brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.app-runner-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	object-fit: cover;
}

.app-runner-title-wrap h2 {
	font-size: 1rem;
	font-weight: 700;
	margin: 0;
	color: #fff;
}

.app-runner-title-wrap small {
	color: #94a3b8;
	font-size: 0.75rem;
}

.app-runner-actions {
	display: flex;
	gap: 8px;
}

.app-runner-action-btn {
	background: rgba(255, 255, 255, 0.08);
	border: none;
	color: #cbd5e1;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s;
}

.app-runner-action-btn:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

.app-runner-frame-wrapper {
	position: relative;
	width: 100%;
	height: 75vh;
	min-height: 520px;
	background: #000;
}

.app-runner-iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

.app-runner-container.is-fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 99999;
	border-radius: 0;
	margin: 0;
}

.app-runner-container.is-fullscreen .app-runner-frame-wrapper {
	height: calc(100vh - 58px);
}

/* ========================================================================= */
/* ЗАГЛУШКА ПУСТОГО СОСТОЯНИЯ ДЛЯ APPS-GRID ВО ВСЮ ШИРИНУ                    */
/* ========================================================================= */
.apps-grid .apps-empty-state,
.apps-empty-state,
.apps-grid > div:only-child {
	grid-column: 1 / -1 !important;
	width: 100% !important;
	min-width: 100% !important;
	box-sizing: border-box !important;
	text-align: center;
	padding: 64px 24px !important;
	background: #ffffff;
	border: 2px dashed #cbd5e1;
	border-radius: 24px;
	margin: 12px 0 24px;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.apps-empty-icon {
	width: 68px;
	height: 68px;
	border-radius: 20px;
	background: rgba(79, 70, 229, 0.1);
	color: #4f46e5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32px;
	margin-bottom: 16px;
}

.apps-empty-state h3 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 6px;
}

.apps-empty-state p {
	font-size: 0.95rem;
	color: #64748b;
	max-width: 420px;
	margin-bottom: 20px;
}

html[data-bs-theme="dark"] .apps-grid .apps-empty-state,
html[data-bs-theme="dark"] .apps-empty-state,
html[data-bs-theme="dark"] .apps-grid > div:only-child {
	background: #161b26;
	border-color: #2a3141;
}

html[data-bs-theme="dark"] .apps-empty-state h3 {
	color: #f1f5f9;
}

html[data-bs-theme="dark"] .apps-empty-state p {
	color: #94a3b8;
}

html[data-bs-theme="dark"] .apps-empty-icon {
	background: rgba(124, 108, 255, 0.15);
	color: #a594fd;
}
