@import "./auth-theme.css";
@import "./header.css";
/* ============================================
	openFashion — Styles
   Mobile-first, modern CSS with variables
   ============================================ */

/* CSS Variables */
:root {
	/* Brand Colors - Deep Royal Rose */
	--primary: #be123c;
	--primary-dark: #9f1239;
	--primary-light: #fff1f2;
	--secondary: #1e293b;
	--secondary-dark: #0f172a;
	--secondary-light: #f1f5f9;
	--accent: #0ea5e9;
	--accent-dark: #0284c7;
	--accent-light: #e0f2fe;

	--success: #10b981;
	--warning: #fbbf24;
	--danger: #ef4444;
	--info: #3b82f6;

	/* Apple Grey Tones */
	--slate-50: #f5f5f7;
	--slate-100: #e8e8ed;
	--slate-200: #d2d2d7;
	--slate-300: #aeaeb2;
	--slate-400: #8e8e93;
	--slate-500: #636366;
	--slate-600: #48484a;
	--slate-700: #3a3a3c;
	--slate-800: #2c2c2e;
	--slate-900: #1d1d1f;

	--bg: #ffffff;
	--bg-secondary: var(--slate-50);
	--text: var(--slate-800);
	--text-secondary: var(--slate-500);
	--border: var(--slate-200);

	--radius: 16px;
	--radius-sm: 8px;
	--radius-lg: 24px;

	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow:
		0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--shadow-lg:
		0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

	--header-height: 56px;
	--nav-height: 64px;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark Mode */
.dark {
	--bg: var(--slate-900);
	--bg-secondary: var(--slate-800);
	--text: var(--slate-100);
	--text-secondary: var(--slate-400);
	--border: var(--slate-700);
	--primary-light: color-mix(in srgb, var(--primary) 20%, transparent);
	--secondary-light: color-mix(in srgb, var(--secondary) 20%, transparent);
	--accent-light: color-mix(in srgb, var(--accent) 20%, transparent);
}

/* Reset */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* Base */
html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.5;
	overflow-x: hidden;
	min-height: 100vh;
	min-height: 100dvh;
}

/* Splash Screen */
.splash-screen {
	position: fixed;
	inset: 0;
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
	opacity: 0;
	pointer-events: none;
}

.splash-content {
	text-align: center;
	color: white;
}

.splash-icon {
	font-size: 4rem;
	margin-bottom: 1rem;
	animation: bounce 1s infinite;
}

.splash-title {
	font-size: 2rem;
	font-weight: 900;
	margin-bottom: 0.25rem;
}

.splash-subtitle {
	opacity: 0.8;
	font-size: 0.875rem;
}

.splash-loader {
	width: 40px;
	height: 4px;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 2px;
	margin: 1.5rem auto 0;
	overflow: hidden;
}

.splash-loader::after {
	content: "";
	display: block;
	width: 50%;
	height: 100%;
	background: white;
	border-radius: 2px;
	animation: loading 1s ease-in-out infinite;
}

@keyframes bounce {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-10px);
	}
}

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

	100% {
		transform: translateX(200%);
	}
}

/* Hidden */
.hidden {
	display: none !important;
}

/* Auth Screen — handled by shared auth-theme.css */

/* Main App */
.main-app {
	height: 100vh;
	height: 100dvh;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	isolation: isolate;
}

.main-app::before {
	content: "";
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transform: scale(1.04);
	filter: saturate(1.08) contrast(1.02);
	z-index: -2;
}

.main-app::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.24) 22%, rgba(255, 244, 244, 0.68) 54%, rgba(248, 250, 252, 0.95) 100%),
		radial-gradient(circle at top right, rgba(244, 63, 94, 0.18), transparent 28%);
	z-index: -1;
}

.main-app[data-module="home"]::before {
	background-image: url("https://images.unsplash.com/photo-1496747611176-843222e1e57c?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="orders"]::before {
	background-image: url("https://images.unsplash.com/photo-1441986300917-64674bd600d8?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="clients"]::before {
	background-image: url("https://images.unsplash.com/photo-1524504388940-b1c1722653e1?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="fabrics"]::before {
	background-image: url("https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="portfolio"]::before {
	background-image: url("https://images.unsplash.com/photo-1529139574466-a303027c1d8b?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="finance"]::before {
	background-image: url("https://images.unsplash.com/photo-1554224155-8d04cb21cd6c?auto=format&fit=crop&w=1600&q=80");
}

.main-app[data-module="settings"]::before {
	background-image: url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80");
}

/* Header */
.header {
	position: sticky;
	top: 0;
	min-height: calc(var(--header-height) + var(--safe-top) + 8px);
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: flex-end;
	padding: calc(var(--safe-top) + 8px) 1rem 8px;
	gap: 0.5rem;
	z-index: 100;
}

.header-title {
	flex: 1;
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.header-btn {
	width: 40px;
	height: 40px;
	border: none;
	background: transparent;
	color: var(--text);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	cursor: pointer;
	transition: background 0.2s;
}

.header-btn:hover {
	background: var(--bg-secondary);
}

.header-actions {
	display: flex;
	gap: 0.25rem;
}

/* Content */
.content {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding-bottom: calc(var(--nav-height) + max(var(--safe-bottom), 8px) + 16px);
	position: relative;
}

/* Bottom Nav */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	height: calc(var(--nav-height) + max(var(--safe-bottom), 8px));
	padding-bottom: max(var(--safe-bottom), 8px);
	background: var(--bg);
	border-top: 1px solid var(--border);
	display: flex;
	z-index: 100;
}

.nav-item {
	flex: 1;
	border: none;
	background: transparent;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	color: var(--text-secondary);
	font-size: 0.65rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.2s;
}

.nav-item i {
	font-size: 1.25rem;
}

.nav-item.active {
	color: var(--primary);
}

/* Side Menu */
.side-menu {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba(0, 0, 0, 0.5);
}

.side-menu-content {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 280px;
	max-width: 80vw;
	background: var(--bg);
	animation: slideIn 0.2s ease;
}

@keyframes slideIn {
	from {
		transform: translateX(100%);
	}

	to {
		transform: translateX(0);
	}
}

.side-menu-header {
	padding: 2rem 1.5rem;
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
}

.menu-user {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: white;
}

.menu-avatar {
	width: 48px;
	height: 48px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	font-weight: 700;
}

.menu-user-details h3 {
	font-weight: 700;
	font-size: 1rem;
}

.menu-user-details p {
	opacity: 0.7;
	font-size: 0.75rem;
}

.side-menu-nav {
	padding: 1rem 0;
}

.side-menu-nav button {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 0.875rem 1.5rem;
	border: none;
	background: transparent;
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}

.side-menu-nav button:hover {
	background: var(--bg-secondary);
}

.side-menu-nav button i {
	font-size: 1.25rem;
	color: var(--text-secondary);
}

/* Cards */
.card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 1rem;
	cursor: default;
}

.card[onclick] {
	cursor: pointer;
	transition:
		transform 0.1s,
		box-shadow 0.2s;
}

.card[onclick]:active {
	transform: scale(0.98);
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.25rem;
	border: none;
	border-radius: var(--radius-sm);
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease,
		background 0.18s ease,
		color 0.18s ease;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.btn-primary {
	background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 86%, white), var(--primary-dark));
	color: white;
}

.btn-primary:hover {
	background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 74%, white), color-mix(in srgb, var(--primary-dark) 90%, black));
}

.btn-secondary {
	background: linear-gradient(135deg, #eff6ff, #dbeafe);
	color: #1d4ed8;
}

.btn-success {
	background: linear-gradient(135deg, #34d399, #059669);
	color: white;
}

.btn-danger {
	background: linear-gradient(135deg, #fb7185, #dc2626);
	color: white;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.btn:active {
	transform: translateY(0) scale(0.985);
}

.btn-block {
	width: 100%;
}

.btn-lg {
	padding: 1rem 1.5rem;
	font-size: 1rem;
}

.btn-sm {
	padding: 0.5rem 0.75rem;
	font-size: 0.75rem;
}

.btn-icon {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 14px;
}

/* Forms */
.form-group {
	margin-bottom: 0;
}

.form-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.form-input,
.form-select {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 1rem;
	font-family: inherit;
	background: var(--bg);
	color: var(--text);
	transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
	outline: none;
	border-color: var(--primary);
}

.form-error {
	color: var(--danger);
	font-size: 0.875rem;
	margin-top: 0.5rem;
}

.input-icon-wrapper {
	position: relative;
}

.input-icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-secondary);
}

.input-icon-wrapper .form-input {
	padding-left: 2.75rem;
}

/* Badges */
.badge {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 100px;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.badge-draft {
	background: var(--slate-200);
	color: var(--slate-600);
}

.badge-approved {
	background: #d1fae5;
	color: #065f46;
}

.badge-active {
	background: #dbeafe;
	color: #1e40af;
}

/* Avatar */
.avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--primary-light);
	color: var(--primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
}

/* Progress Bar */
.progress-bar {
	height: 6px;
	background: var(--slate-200);
	border-radius: 3px;
	overflow: hidden;
}

.progress-bar-fill {
	height: 100%;
	background: var(--primary);
	border-radius: 3px;
	transition: width 0.3s ease;
}

/* Grid Stats */
.grid-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
}

.grid-stat {
	text-align: center;
	padding: 0.75rem 0.5rem;
	background: rgba(255, 255, 255, 0.92);
	border-radius: var(--radius-sm);
	box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.grid-stat-label {
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--text-secondary);
	margin-bottom: 0.25rem;
}

.grid-stat-value {
	font-size: 1rem;
	font-weight: 800;
	color: var(--text);
}

/* Login-style shell for module and settings landing pages */
.landing-shell {
	min-height: 100%;
	padding: 16px;
	background: transparent;
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

.landing-panel {
	width: 100%;
	max-width: 980px;
	padding: 16px;
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.45);
	box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.landing-panel--settings {
	overflow: hidden;
	padding: 0;
}

.settings-shell-hero {
	position: relative;
	min-height: 160px;
	background-size: cover;
	background-position: center;
}

.settings-shell-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(15, 23, 42, 0.18) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.settings-shell-hero__content {
	position: relative;
	z-index: 1;
	padding: 1.1rem 1rem;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	color: #fff;
}

.settings-shell-hero__title {
	font-size: 1.35rem;
	font-weight: 900;
	line-height: 1.2;
	margin-bottom: 0.25rem;
}

.settings-shell-hero__subtitle {
	font-size: 0.84rem;
	line-height: 1.45;
	opacity: 0.94;
	max-width: 44rem;
}

.settings-shell-body {
	padding: 1rem;
	display: grid;
	gap: 1rem;
}

/* Home Hub */
.home-hub {
	padding: 0;
	display: grid;
	gap: 0.9rem;
}

.home-hub__hero {
	position: relative;
	padding: 1rem;
	border-radius: 18px;
	background: linear-gradient(140deg, rgba(15, 23, 42, 0.88) 0%, rgba(51, 65, 85, 0.76) 100%);
	color: #fff;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.home-hub__hero::after {
	content: "";
	position: absolute;
	inset: auto -20% -50% auto;
	width: 220px;
	height: 220px;
	border-radius: 999px;
	background: radial-gradient(circle, rgba(225, 29, 72, 0.45), transparent 70%);
	pointer-events: none;
}

.home-hub__kicker {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	opacity: 0.85;
	margin-bottom: 0.4rem;
}

.home-hub__title {
	font-size: 1.35rem;
	font-weight: 900;
	margin-bottom: 0.15rem;
	line-height: 1.2;
}

.home-hub__subtitle {
	font-size: 0.82rem;
	opacity: 0.88;
}

.module-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.7rem;
}

.module-card {
	position: relative;
	border: 1px solid rgba(255, 255, 255, 0.78);
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	min-height: 124px;
	text-align: left;
	color: #0f172a;
	cursor: pointer;
	box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
	transform: translateZ(0);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	background: rgba(255, 255, 255, 0.9);
}

.module-card:active {
	transform: scale(0.98);
}

.module-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-lg);
}

.module-card__content {
	position: relative;
	inset: auto;
}

.module-card__content {
	display: flex;
	align-items: center;
	padding: 0.9rem;
	gap: 0.7rem;
}

.module-card__icon {
	width: 46px;
	height: 46px;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2rem;
	color: #fff;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.module-card__meta {
	flex: 1;
	min-width: 0;
}

.module-card__title {
	font-size: 0.96rem;
	font-weight: 800;
	line-height: 1.2;
	color: #0f172a;
}

.module-card__desc {
	font-size: 0.72rem;
	line-height: 1.35;
	color: #475569;
}

.module-card__arrow {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	background: rgba(255, 255, 255, 0.78);
	color: #0f172a;
}

.module-card--rose .module-card__icon {
	background: linear-gradient(135deg, #fb7185, #e11d48);
}

.module-card--blue .module-card__icon {
	background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.module-card--amber .module-card__icon {
	background: linear-gradient(135deg, #fbbf24, #f97316);
}

.module-card--emerald .module-card__icon {
	background: linear-gradient(135deg, #34d399, #059669);
}

.module-card--indigo .module-card__icon {
	background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.module-card--slate .module-card__icon {
	background: linear-gradient(135deg, #64748b, #334155);
}

/* Settings Hub */
.settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.settings-card {
	border: 1px solid var(--border);
	background: var(--bg);
	border-radius: 14px;
	padding: 0.9rem;
	text-align: left;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.settings-card:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.settings-card:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.settings-card__icon {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: color-mix(in srgb, var(--primary) 16%, transparent);
	color: var(--primary);
	font-size: 1rem;
	margin-bottom: 0.55rem;
}

.settings-card__title {
	font-size: 0.92rem;
	font-weight: 800;
	margin-bottom: 0.2rem;
	color: var(--text);
}

.settings-card__desc {
	font-size: 0.76rem;
	line-height: 1.35;
	color: var(--text-secondary);
}

@media (min-width: 720px) {
	.module-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.settings-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Empty State */
.empty-state {
	text-align: center;
	padding: 3rem 1rem;
	color: #475569;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 24px;
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.empty-state i {
	font-size: 3rem;
	opacity: 0.9;
	color: var(--primary);
	margin-bottom: 1rem;
}

.empty-state p {
	margin-bottom: 1rem;
}

/* Menu Item */
.menu-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 1rem;
	border: none;
	background: rgba(255, 255, 255, 0.88);
	border-radius: var(--radius-sm);
	color: var(--text);
	font-size: 0.875rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.menu-item:hover {
	background: rgba(255, 255, 255, 0.96);
	transform: translateY(-1px);
}

.menu-item i {
	font-size: 1.25rem;
	color: var(--primary);
	width: 2.3rem;
	height: 2.3rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: color-mix(in srgb, var(--primary) 12%, white);
}

/* Page Header */
.page-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.55rem 0.7rem;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.82);
	backdrop-filter: blur(10px);
	box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.page-header--actions {
	justify-content: flex-end;
	padding: 0;
	background: transparent;
	backdrop-filter: none;
	box-shadow: none;
}

.page-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--text);
}

/* Divider */
.divider {
	height: 1px;
	background: var(--border);
	margin: 1rem 0;
}

/* Modal */
.modal-container {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: flex-end;
	justify-content: center;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.modal-content {
	position: relative;
	background: var(--bg);
	border-radius: var(--radius-lg) var(--radius-lg) 0 0;
	width: 100%;
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
	animation: slideUp 0.3s ease;
}

@keyframes slideUp {
	from {
		transform: translateY(100%);
	}

	to {
		transform: translateY(0);
	}
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
}

.modal-title {
	font-size: 1.125rem;
	font-weight: 700;
}

.modal-close {
	width: 32px;
	height: 32px;
	border: none;
	background: var(--bg-secondary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* Toast */
.toast-container {
	position: fixed;
	top: calc(var(--header-height) + 1rem);
	left: 1rem;
	right: 1rem;
	z-index: 400;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.toast {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem;
	background: var(--slate-800);
	color: white;
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
	animation: fadeIn 0.3s ease;
	transition:
		opacity 0.3s,
		transform 0.3s;
}

.toast.success {
	background: var(--success);
}

.toast.warning {
	background: var(--warning);
}

.toast.error {
	background: var(--danger);
}

.toast.info {
	background: var(--info);
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Install Prompt */
.install-prompt {
	position: fixed;
	bottom: calc(var(--nav-height) + var(--safe-bottom) + 1rem);
	left: 1rem;
	right: 1rem;
	z-index: 150;
}

.install-prompt-content {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
}

.install-icon {
	width: 48px;
	height: 48px;
	background: var(--primary-light);
	color: var(--primary);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
}

.install-text {
	flex: 1;
}

.install-text h3 {
	font-size: 0.875rem;
	font-weight: 700;
}

.install-text p {
	font-size: 0.75rem;
	color: var(--text-secondary);
}

.install-actions {
	display: flex;
	gap: 0.5rem;
}

/* Animation */
.anim-fade {
	animation: fadeIn 0.3s ease;
}

/* Utilities */
.p-4 {
	padding: 1rem;
}

.space-y-2 > * + * {
	margin-top: 0.5rem;
}

.space-y-3 > * + * {
	margin-top: 0.75rem;
}

.space-y-4 > * + * {
	margin-top: 1rem;
}

.space-y-5 > * + * {
	margin-top: 1.25rem;
}

.flex {
	display: flex;
}

.flex-1 {
	flex: 1;
}

.items-center {
	align-items: center;
}

.items-start {
	align-items: flex-start;
}

.justify-between {
	justify-content: space-between;
}

.gap-2 {
	gap: 0.5rem;
}

.gap-3 {
	gap: 0.75rem;
}

.gap-4 {
	gap: 1rem;
}

.grid {
	display: grid;
}

.grid-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.min-w-0 {
	min-width: 0;
}

.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

.text-xs {
	font-size: 0.75rem;
}

.text-sm {
	font-size: 0.875rem;
}

.text-lg {
	font-size: 1.125rem;
}

.text-xl {
	font-size: 1.25rem;
}

.text-2xl {
	font-size: 1.5rem;
}

.font-bold {
	font-weight: 700;
}

.font-extrabold {
	font-weight: 800;
}

.uppercase {
	text-transform: uppercase;
}

.mb-1 {
	margin-bottom: 0.25rem;
}

.mb-2 {
	margin-bottom: 0.5rem;
}

.mb-3 {
	margin-bottom: 0.75rem;
}

.mb-4 {
	margin-bottom: 1rem;
}

.mt-1 {
	margin-top: 0.25rem;
}

.mt-2 {
	margin-top: 0.5rem;
}

.mt-3 {
	margin-top: 0.75rem;
}

.ml-2 {
	margin-left: 0.5rem;
}

.ml-auto {
	margin-left: auto;
}

.mr-1 {
	margin-right: 0.25rem;
}

.mr-2 {
	margin-right: 0.5rem;
}

.w-full {
	width: 100%;
}

.w-12 {
	width: 3rem;
}

.h-12 {
	height: 3rem;
}

.min-h-\[80px\] {
	min-height: 80px;
}

.rounded-xl {
	border-radius: 0.75rem;
}

.rounded-2xl {
	border-radius: 1rem;
}

.rounded-lg {
	border-radius: 0.5rem;
}

.border-2 {
	border-width: 2px;
}

.border-dashed {
	border-style: dashed;
}

.overflow-hidden {
	overflow: hidden;
}

.overflow-x-auto {
	overflow-x: auto;
}

.object-cover {
	object-fit: cover;
}

.py-2 {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.py-4 {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.text-slate-300 {
	color: var(--slate-300);
}

.text-slate-400 {
	color: var(--slate-400);
}

.text-slate-500 {
	color: var(--slate-500);
}

.text-slate-600 {
	color: var(--slate-600);
}

.text-slate-700 {
	color: var(--slate-700);
}

.text-slate-800 {
	color: var(--slate-800);
}

.text-green-500 {
	color: #10b981;
}

.text-green-600 {
	color: #059669;
}

.text-green-700 {
	color: #047857;
}

.text-red-400 {
	color: #f87171;
}

.text-red-500 {
	color: #ef4444;
}

.text-red-600 {
	color: #dc2626;
}

.text-red-700 {
	color: #b91c1c;
}

.text-emerald-400 {
	color: #34d399;
}

.text-emerald-500 {
	color: #10b981;
}

.text-emerald-600 {
	color: #059669;
}

.text-emerald-700 {
	color: #047857;
}

.text-amber-500 {
	color: #f59e0b;
}

.text-amber-600 {
	color: #d97706;
}

.text-blue-500 {
	color: #3b82f6;
}

.text-blue-600 {
	color: #2563eb;
}

.text-blue-700 {
	color: #1d4ed8;
}

.bg-slate-50 {
	background: var(--slate-50);
}

.bg-slate-100 {
	background: var(--slate-100);
}

.bg-green-50 {
	background: #ecfdf5;
}

.bg-red-50 {
	background: #fef2f2;
}

.bg-emerald-50 {
	background: #ecfdf5;
}

.bg-emerald-100 {
	background: #d1fae5;
}

.bg-amber-50 {
	background: #fffbeb;
}

.bg-blue-50 {
	background: #eff6ff;
}

.border-slate-100 {
	border-color: var(--slate-100);
}

.border-slate-200 {
	border-color: var(--slate-200);
}

.border-slate-300 {
	border-color: var(--slate-300);
}

.border-emerald-200 {
	border-color: #a7f3d0;
}

.border-red-200 {
	border-color: #fecaca;
}

.border-blue-200 {
	border-color: #bfdbfe;
}

.border-t {
	border-top: 1px solid var(--border);
}

.border-b {
	border-bottom: 1px solid var(--border);
}

.border-t-2 {
	border-top: 2px solid var(--border);
}

.last\:border-0:last-child {
	border: 0;
}

.italic {
	font-style: italic;
}

.break-all {
	word-break: break-all;
}

.font-mono {
	font-family: ui-monospace, monospace;
}

/* Filter buttons */
.filter-btn {
	white-space: nowrap;
	background: var(--bg-secondary);
	color: var(--text-secondary);
}

.filter-btn.active {
	background: var(--primary);
	color: white;
}

/* Loading spinner */
.loading-spinner {
	width: 24px;
	height: 24px;
	border: 2px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	margin: 2rem auto;
}

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

/* Syncing animation */
.syncing {
	animation: pulse 1s infinite;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.5;
	}
}

/* ============================================
   OFFLINE STATUS BADGE
   ============================================ */
.offline-badge {
	position: fixed;
	top: 60px;
	right: 12px;
	padding: 8px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
	z-index: 10000;
	transition: all 0.3s ease;
	box-shadow: var(--shadow-lg);
}

.badge--caching {
	background: #1d4ed8;
	color: white;
	animation: badge-pulse 1.5s ease-in-out infinite;
}

.badge--ready {
	background: #047857;
	color: white;
}

.badge--offline {
	background: #c2410c;
	color: white;
}

.badge--error {
	background: #b91c1c;
	color: white;
}

.badge--hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateY(-10px);
}

@keyframes badge-pulse {
	0%,
	100% {
		opacity: 1;
	}

	50% {
		opacity: 0.7;
	}
}

/* ============================================
   INLINE ICON SYSTEM
   ============================================ */
.icon,
[data-icon],
i[class*="ph-"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25em;
	height: 1.25em;
	vertical-align: middle;
}

.icon svg,
[data-icon] svg,
i[class*="ph-"] svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.icon-sm {
	width: 1em;
	height: 1em;
}

.icon-lg {
	width: 1.5em;
	height: 1.5em;
}

.icon-xl {
	width: 2em;
	height: 2em;
}
