:root {
	--font-ar: "Cairo", "Tajawal", system-ui, -apple-system, sans-serif;
	--font-en: "Outfit", system-ui, -apple-system, sans-serif;
	--font-main: var(--font-ar);

	--bg: #0b0f19;
	--bg-elevated: #111827;
	--bg-card: #1a2234;
	--bg-card-hover: #222d44;
	--bg-glass: rgba(17, 24, 39, 0.85);

	--fg: #f3f4f6;
	--fg-muted: #9ca3af;
	--fg-subtle: #6b7280;

	--primary: #059669;
	--primary-hover: #10b981;
	--primary-light: rgba(16, 185, 129, 0.15);
	--primary-border: rgba(16, 185, 129, 0.3);

	--gold: #f59e0b;
	--gold-light: rgba(245, 158, 11, 0.15);

	--cyan: #06b6d4;
	--danger: #ef4444;
	--danger-light: rgba(239, 68, 68, 0.15);
	--border: #283548;
	--border-light: rgba(255, 255, 255, 0.08);

	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 20px;
	--radius-xl: 28px;
	--radius-full: 9999px;

	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
	--shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
}

[data-theme="light"] {
	--bg: #f8fafc;
	--bg-elevated: #ffffff;
	--bg-card: #ffffff;
	--bg-card-hover: #f1f5f9;
	--bg-glass: rgba(255, 255, 255, 0.9);

	--fg: #0f172a;
	--fg-muted: #475569;
	--fg-subtle: #94a3b8;

	--primary: #059669;
	--primary-hover: #047857;
	--primary-light: rgba(5, 150, 105, 0.1);
	--primary-border: rgba(5, 150, 105, 0.25);

	--border: #e2e8f0;
	--border-light: rgba(0, 0, 0, 0.06);

	--shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
	--shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
	--shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
	--shadow-glow: 0 0 20px rgba(5, 150, 105, 0.15);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--bg);
	color: var(--fg);
	font-family: var(--font-main);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	overflow-x: hidden;
}

[dir="ltr"] {
	font-family: var(--font-en), var(--font-ar);
}

button, input, select, textarea {
	font-family: inherit;
}

a {
	color: inherit;
	text-decoration: none;
}

/* Header & Nav */
.header-bar {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--bg-glass);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
	transition: all 0.2s ease;
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0.75rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.brand-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
	user-select: none;
	transition: transform 0.2s ease;
}

.brand-logo:hover {
	transform: scale(1.02);
}

.logo-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, #10b981 0%, #047857 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.brand-text {
	display: flex;
	flex-direction: column;
}

.brand-name {
	font-size: 1.3rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--fg);
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.brand-name span {
	color: var(--primary-hover);
}

.brand-sub {
	font-size: 0.75rem;
	color: var(--fg-muted);
	font-weight: 500;
}

.header-search {
	flex: 1;
	max-width: 480px;
	position: relative;
}

.search-input-wrap {
	display: flex;
	align-items: center;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-full);
	padding: 0.4rem 1rem;
	transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input-wrap input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: var(--fg);
	font-size: 0.95rem;
	padding: 0.25rem 0.5rem;
}

.search-icon {
	color: var(--fg-muted);
	display: flex;
	align-items: center;
}

.clear-search-btn {
	background: none;
	border: none;
	color: var(--fg-muted);
	cursor: pointer;
	padding: 2px;
	display: flex;
	align-items: center;
	font-size: 0.9rem;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.icon-btn {
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--fg);
	padding: 0.55rem 0.85rem;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	transition: all 0.2s ease;
}

.icon-btn:hover {
	background: var(--bg-card-hover);
	border-color: var(--primary-border);
}

.btn-primary-action {
	background: var(--primary);
	color: #ffffff;
	border-color: transparent;
}

.btn-primary-action:hover {
	background: var(--primary-hover);
	box-shadow: var(--shadow-glow);
}

/* Layout container */
.main-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 1.5rem 1.25rem 4rem;
}

/* Hero Section */
.store-hero {
	background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.08) 50%, rgba(245, 158, 11, 0.06) 100%);
	border: 1px solid var(--primary-border);
	border-radius: var(--radius-xl);
	padding: 2rem 2.5rem;
	margin-bottom: 2rem;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

.hero-content {
	max-width: 680px;
	z-index: 2;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--primary-light);
	border: 1px solid var(--primary-border);
	color: var(--primary-hover);
	padding: 0.35rem 0.85rem;
	border-radius: var(--radius-full);
	font-size: 0.82rem;
	font-weight: 700;
	margin-bottom: 0.9rem;
}

.hero-title {
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	font-weight: 900;
	line-height: 1.25;
	margin-bottom: 0.75rem;
	color: var(--fg);
}

.hero-desc {
	font-size: 1rem;
	color: var(--fg-muted);
	line-height: 1.6;
	margin-bottom: 1.25rem;
}

.hero-stats-row {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.hero-stat-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.88rem;
	color: var(--fg-muted);
}

.hero-stat-item strong {
	color: var(--fg);
	font-weight: 700;
}

.hero-art {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.hero-phone-mock {
	width: 130px;
	height: 160px;
	background: var(--bg-elevated);
	border: 2px solid var(--primary-border);
	border-radius: 20px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-lg), 0 0 30px rgba(16, 185, 129, 0.2);
	transform: rotate(-6deg);
	transition: transform 0.3s ease;
}

.hero-phone-mock:hover {
	transform: rotate(0deg) scale(1.05);
}

/* Category Chips bar */
.category-chips-wrap {
	margin-bottom: 2rem;
	position: relative;
}

.category-chips {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	overflow-x: auto;
	padding: 0.35rem 0.25rem 0.75rem;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
	height: 4px;
}

.category-chips::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

.chip-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1.1rem;
	border-radius: var(--radius-full);
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--fg-muted);
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.2s ease;
}

.chip-btn:hover {
	background: var(--bg-card-hover);
	color: var(--fg);
	border-color: var(--fg-subtle);
}

.chip-btn.active {
	background: var(--primary);
	color: #ffffff;
	border-color: var(--primary);
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Section Header */
.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	gap: 1rem;
	flex-wrap: wrap;
}

.section-title-wrap {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.section-title {
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--fg);
}

.section-count-badge {
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--fg-muted);
	font-size: 0.8rem;
	padding: 0.15rem 0.6rem;
	border-radius: var(--radius-full);
	font-weight: 700;
}

.sort-selector {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0.35rem 0.75rem;
	color: var(--fg-muted);
	font-size: 0.85rem;
}

.sort-selector select {
	background: transparent;
	border: none;
	color: var(--fg);
	font-weight: 600;
	outline: none;
	cursor: pointer;
}

/* Apps Grid */
.apps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.25rem;
	margin-bottom: 3rem;
}

/* App Card */
.app-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1rem;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	cursor: pointer;
}

.app-card:hover {
	transform: translateY(-4px);
	background: var(--bg-card-hover);
	border-color: var(--primary-border);
	box-shadow: var(--shadow-md);
}

.app-card-top {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
}

.app-icon {
	width: 68px;
	height: 68px;
	border-radius: 16px;
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	border: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.app-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.app-icon-placeholder {
	font-size: 1.8rem;
	font-weight: 800;
	color: var(--primary-hover);
	display: flex;
	align-items: center;
	justify-content: center;
}

.app-meta {
	flex: 1;
	min-width: 0;
}

.app-card-name {
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--fg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 0.15rem;
}

.app-card-dev {
	font-size: 0.82rem;
	color: var(--fg-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-bottom: 0.4rem;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.verified-icon {
	color: var(--primary-hover);
	display: inline-flex;
}

.app-category-tag {
	display: inline-block;
	background: var(--primary-light);
	color: var(--primary-hover);
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.15rem 0.55rem;
	border-radius: var(--radius-full);
}

.app-card-desc {
	font-size: 0.86rem;
	color: var(--fg-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.45;
}

.app-card-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 0.75rem;
	border-top: 1px solid var(--border-light);
	gap: 0.5rem;
}

.app-stats-group {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	font-size: 0.82rem;
	color: var(--fg-muted);
}

.stat-rating {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	font-weight: 700;
	color: var(--fg);
}

.star-icon {
	color: var(--gold);
	display: inline-flex;
}

.stat-downloads {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.app-card-action-btn {
	background: var(--primary-light);
	color: var(--primary-hover);
	border: 1px solid var(--primary-border);
	padding: 0.45rem 0.85rem;
	border-radius: var(--radius);
	font-size: 0.82rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.app-card-action-btn:hover {
	background: var(--primary);
	color: #ffffff;
}

/* App Detail Page */
.detail-view {
	max-width: 960px;
	margin: 0 auto;
}

.back-btn-strip {
	margin-bottom: 1.25rem;
}

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--fg-muted);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s ease;
}

.back-link:hover {
	color: var(--fg);
}

.detail-header-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 2rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-md);
}

.detail-header-top {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	flex-wrap: wrap;
}

.detail-app-icon {
	width: 100px;
	height: 100px;
	border-radius: 24px;
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	border: 2px solid var(--primary-border);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.detail-app-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.detail-app-icon-placeholder {
	font-size: 2.8rem;
	font-weight: 900;
	color: var(--primary-hover);
}

.detail-header-info {
	flex: 1;
	min-width: 260px;
}

.detail-title {
	font-size: 1.75rem;
	font-weight: 900;
	color: var(--fg);
	line-height: 1.2;
	margin-bottom: 0.25rem;
}

.detail-subtitle {
	font-size: 0.95rem;
	color: var(--fg-muted);
	margin-bottom: 0.5rem;
	direction: ltr;
	display: inline-block;
}

.detail-dev-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.9rem;
	color: var(--fg-muted);
	margin-bottom: 0.75rem;
	flex-wrap: wrap;
}

.detail-dev-name {
	color: var(--primary-hover);
	font-weight: 700;
}

.detail-package-badge {
	font-family: monospace;
	font-size: 0.78rem;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	padding: 0.15rem 0.5rem;
	border-radius: 6px;
	color: var(--fg-subtle);
}

/* Key Metrics Strip */
.metrics-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin: 1.5rem 0;
	padding: 1.25rem 0;
	border-top: 1px solid var(--border-light);
	border-bottom: 1px solid var(--border-light);
	text-align: center;
}

.metric-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
}

.metric-val {
	font-size: 1.2rem;
	font-weight: 800;
	color: var(--fg);
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.metric-label {
	font-size: 0.78rem;
	color: var(--fg-muted);
}

/* Big Download Area */
.download-action-area {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-top: 1.5rem;
}

.btn-big-download {
	flex: 1;
	min-width: 240px;
	background: linear-gradient(135deg, #059669 0%, #10b981 100%);
	color: #ffffff;
	border: none;
	padding: 0.95rem 1.75rem;
	border-radius: var(--radius-lg);
	font-size: 1.1rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
	transition: all 0.2s ease;
}

.btn-big-download:hover {
	filter: brightness(1.08);
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.btn-big-download:active {
	transform: translateY(0);
}

.download-version-badge {
	font-size: 0.85rem;
	background: rgba(0, 0, 0, 0.2);
	padding: 0.2rem 0.6rem;
	border-radius: var(--radius-full);
	font-weight: 600;
}

.security-verified-tag {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--primary-hover);
	font-size: 0.85rem;
	font-weight: 700;
	background: var(--primary-light);
	padding: 0.45rem 0.9rem;
	border-radius: var(--radius-full);
	border: 1px solid var(--primary-border);
}

/* Screenshots Gallery */
.screenshots-section {
	margin-bottom: 2rem;
}

.screenshots-row {
	display: flex;
	align-items: center;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 1rem;
	scrollbar-width: thin;
}

.screenshot-thumb {
	width: 200px;
	height: 350px;
	border-radius: var(--radius-lg);
	background: var(--bg-card);
	border: 1px solid var(--border);
	overflow: hidden;
	flex-shrink: 0;
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	transition: transform 0.2s ease;
}

.screenshot-thumb:hover {
	transform: scale(1.02);
	border-color: var(--primary-border);
}

.screenshot-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Tabs & Content */
.detail-tabs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	border-bottom: 1px solid var(--border);
	margin-bottom: 1.5rem;
	overflow-x: auto;
}

.detail-tab-btn {
	padding: 0.75rem 1.25rem;
	background: transparent;
	border: none;
	color: var(--fg-muted);
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	position: relative;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.detail-tab-btn:hover {
	color: var(--fg);
}

.detail-tab-btn.active {
	color: var(--primary-hover);
}

.detail-tab-btn.active::after {
	content: "";
	position: absolute;
	bottom: -1px;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--primary-hover);
	border-radius: 3px 3px 0 0;
}

.detail-tab-pane {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 1.75rem;
	margin-bottom: 2rem;
}

.pane-title {
	font-size: 1.2rem;
	font-weight: 800;
	margin-bottom: 1rem;
	color: var(--fg);
}

.desc-text {
	color: var(--fg-muted);
	font-size: 0.98rem;
	line-height: 1.8;
	white-space: pre-line;
}

/* Versions List */
.version-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1.25rem;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

.version-card.is-active {
	border-color: var(--primary-border);
	background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.version-meta {
	flex: 1;
	min-width: 200px;
}

.version-title-row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.25rem;
}

.version-name {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--fg);
}

.badge-active-version {
	background: var(--primary);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 0.15rem 0.5rem;
	border-radius: var(--radius-full);
}

.version-info-line {
	font-size: 0.82rem;
	color: var(--fg-muted);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.4rem;
}

.version-changelog {
	font-size: 0.88rem;
	color: var(--fg);
	background: var(--bg-card);
	padding: 0.5rem 0.75rem;
	border-radius: var(--radius-sm);
	margin-top: 0.4rem;
	border-inline-start: 3px solid var(--primary);
}

/* Reviews */
.reviews-summary {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--border-light);
	flex-wrap: wrap;
}

.big-rating-number {
	font-size: 3rem;
	font-weight: 900;
	color: var(--fg);
	line-height: 1;
}

.rating-stars-row {
	display: flex;
	align-items: center;
	gap: 0.2rem;
	color: var(--gold);
	font-size: 1.2rem;
}

.review-form-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	margin-bottom: 2rem;
}

.review-stars-select {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
}

.star-rating-btn {
	background: none;
	border: none;
	font-size: 1.6rem;
	cursor: pointer;
	color: var(--border);
	transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating-btn.active {
	color: var(--gold);
}

.star-rating-btn:hover {
	transform: scale(1.2);
}

.reviews-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.review-item {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
}

.review-author-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.4rem;
}

.review-author {
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--fg);
}

.review-date {
	font-size: 0.78rem;
	color: var(--fg-subtle);
}

.review-comment {
	font-size: 0.88rem;
	color: var(--fg-muted);
	line-height: 1.5;
}

/* Admin Panel */
.admin-shell {
	max-width: 1280px;
	margin: 0 auto;
}

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

.admin-nav {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--border);
}

.admin-nav-btn {
	padding: 0.6rem 1.1rem;
	border-radius: var(--radius);
	background: var(--bg-card);
	border: 1px solid var(--border);
	color: var(--fg-muted);
	font-weight: 700;
	font-size: 0.88rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.admin-nav-btn:hover {
	background: var(--bg-card-hover);
	color: var(--fg);
}

.admin-nav-btn.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

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

.stat-box {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 1.25rem;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.stat-box-icon {
	width: 50px;
	height: 50px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.3rem;
	flex-shrink: 0;
}

.stat-box-info {
	display: flex;
	flex-direction: column;
}

.stat-box-val {
	font-size: 1.6rem;
	font-weight: 900;
	color: var(--fg);
	line-height: 1.2;
}

.stat-box-title {
	font-size: 0.82rem;
	color: var(--fg-muted);
	font-weight: 600;
}

/* Forms */
.form-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	padding: 2rem;
	margin-bottom: 2rem;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.25rem;
}

.form-grid-full {
	grid-column: 1 / -1;
}

.form-field {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.form-field label {
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--fg);
}

.form-field input,
.form-field select,
.form-field textarea {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--fg);
	padding: 0.65rem 0.9rem;
	border-radius: var(--radius);
	outline: none;
	font-size: 0.92rem;
	transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
	font-size: 0.78rem;
	color: var(--fg-subtle);
}

/* File Upload Zone */
.file-upload-zone {
	border: 2px dashed var(--primary-border);
	border-radius: var(--radius-lg);
	padding: 2rem 1.5rem;
	text-align: center;
	background: var(--primary-light);
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
}

.file-upload-zone:hover {
	background: rgba(16, 185, 129, 0.2);
	border-color: var(--primary-hover);
}

.upload-icon {
	color: var(--primary-hover);
	font-size: 2rem;
}

.upload-text-main {
	font-weight: 800;
	color: var(--fg);
	font-size: 1rem;
}

.upload-text-sub {
	font-size: 0.82rem;
	color: var(--fg-muted);
}

.apk-verified-badge-inline {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	background: var(--primary);
	color: #fff;
	padding: 0.3rem 0.75rem;
	border-radius: var(--radius-full);
	font-size: 0.8rem;
	font-weight: 700;
	margin-top: 0.5rem;
}

/* Table UI */
.custom-table-wrap {
	overflow-x: auto;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
}

.custom-table {
	width: 100%;
	border-collapse: collapse;
	text-align: right;
}

[dir="ltr"] .custom-table {
	text-align: left;
}

.custom-table th {
	background: var(--bg-elevated);
	padding: 0.9rem 1.25rem;
	font-size: 0.85rem;
	font-weight: 800;
	color: var(--fg-muted);
	border-bottom: 1px solid var(--border);
}

.custom-table td {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--border-light);
	font-size: 0.9rem;
	vertical-align: middle;
}

.custom-table tr:hover td {
	background: var(--bg-card-hover);
}

/* Modals */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.modal-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-xl);
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: var(--shadow-lg);
	padding: 2rem;
	position: relative;
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.modal-title {
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--fg);
}

.close-modal-btn {
	background: none;
	border: none;
	color: var(--fg-muted);
	font-size: 1.5rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
}

.close-modal-btn:hover {
	color: var(--fg);
}

/* Footer */
.store-footer {
	background: var(--bg-elevated);
	border-top: 1px solid var(--border);
	padding: 3rem 1.25rem 2rem;
	margin-top: 4rem;
}

.footer-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
	margin-bottom: 2rem;
}

.footer-brand {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.footer-desc {
	font-size: 0.9rem;
	color: var(--fg-muted);
	max-width: 400px;
	line-height: 1.6;
}

.footer-col-title {
	font-size: 1rem;
	font-weight: 800;
	color: var(--fg);
	margin-bottom: 0.9rem;
}

.footer-links {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.footer-links a,
.footer-links button {
	color: var(--fg-muted);
	font-size: 0.88rem;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	text-align: inherit;
	transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links button:hover {
	color: var(--primary-hover);
}

.footer-bottom {
	max-width: 1280px;
	margin: 0 auto;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border-light);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.82rem;
	color: var(--fg-subtle);
	flex-wrap: wrap;
	gap: 1rem;
}

/* Primitives from ui.tsx */
.loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	padding: 3rem 1rem;
	color: var(--fg-muted);
	font-weight: 600;
}

.spinner {
	width: 24px;
	height: 24px;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.empty {
	text-align: center;
	padding: 3.5rem 1.5rem;
	background: var(--bg-card);
	border: 1px dashed var(--border);
	border-radius: var(--radius-xl);
	margin: 1.5rem 0;
}

.empty-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--fg);
	margin-bottom: 0.4rem;
}

.empty .hint {
	color: var(--fg-muted);
	font-size: 0.92rem;
	max-width: 450px;
	margin: 0 auto 1.25rem;
}

.alert {
	padding: 0.9rem 1.25rem;
	border-radius: var(--radius);
	font-size: 0.9rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.alert-error {
	background: var(--danger-light);
	border: 1px solid var(--danger);
	color: var(--danger);
}

.alert-success {
	background: var(--primary-light);
	border: 1px solid var(--primary);
	color: var(--primary-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.header-inner {
		flex-wrap: wrap;
	}

	.header-search {
		order: 3;
		max-width: 100%;
		width: 100%;
	}

	.store-hero {
		padding: 1.5rem;
		flex-direction: column;
		align-items: flex-start;
	}

	.hero-art {
		display: none;
	}

	.metrics-strip {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

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

	.footer-inner {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
}
