@font-face {
	font-family: "Outfit";
	src: url("../typography/Outfit-Regular.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "Outfit";
	src: url("../typography/Outfit-SemiBold.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
}

@font-face {
	font-family: "Outfit";
	src: url("../typography/Outfit-Bold.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Outfit", sans-serif;
	-webkit-tap-highlight-color: transparent;
	scrollbar-width: none;
	transition: all 0.2s ease;
}

*::-webkit-scrollbar {
	display: none;
}

:root {
	--accent: #a667e4;
	--alert: #ff4d4d;
	--text-muted: #808080;
}

body {
	background-color: #0d0d0d;
	color: hsl(0, 0%, 100%);
	min-height: 100vh;
	overflow-x: hidden;
	max-width: 768px;
	margin: 0 auto;
	padding: 1.5rem;
	overscroll-behavior-y: contain;
	touch-action: pan-y;
}
body.modal-open {
	overflow-y: hidden;
}

@media (min-width: 768px) {
	body {
		max-width: 100%;
		padding: 0;
		display: flex;
		align-items: flex-start;
		touch-action: auto;
	}
}

html,
body {
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;

	-webkit-touch-callout: none;
}

img {
	pointer-events: none;
}

@media (min-width: 768px) {
	.app-container {
		flex: 1;
		min-width: 0;
		padding: 2rem 3rem;
		max-width: 860px;
		margin: 0 auto;
		overflow-y: auto;
	}
}

.main-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 5px;
}
@media (min-width: 768px) {
	.main-header {
		position: fixed;
		left: 0;
		bottom: 0;
		padding-bottom: 1.5rem;
		padding-inline: 1rem;
		z-index: 1;
		max-width: fit-content;
		max-height: fit-content;
		gap: 10px;
	}
}

.app-name {
	font-size: 2rem;
	font-weight: 600;
}
@media (min-width: 768px) {
	.app-name {
		display: none;
	}
}

.view {
	width: 100%;
	padding-top: 1.5rem;
	padding-bottom: 8rem;
	display: none;
}
.view.active {
	display: block;
}
@media (min-width: 768px) {
	.view {
		padding-bottom: 3rem;
	}
}

.quick-actions {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem;
}

.action-card {
	background: hsl(270, 50%, 30%);
	border-radius: 28px;
	padding: 2rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	cursor: pointer;
}
@media (min-width: 768px) {
	.action-card:hover {
		filter: brightness(1.15);
		transform: translateY(-2px);
	}
}

.action-card-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: hsla(0, 0%, 100%, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(10px);
}

.action-card-icon img {
	width: 28px;
}

.home-stats {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 1.2rem;
}

.stat-card {
	border-radius: 24px;
	padding: 1.5rem;
	width: 100%;
	background: hsla(0, 0%, 20%, 0.5);
	border: 1px solid hsla(0, 0%, 100%, 0.08);
	display: flex;
	flex-direction: column;
}
@media (min-width: 768px) {
	.home-stats {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

.stat-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.8rem;
}

.stat-icon {
	width: 32px;
	height: 32px;
}

.stat-label {
	color: var(--text-muted);
	font-size: 1.15rem;
	letter-spacing: 0.8px;
	font-weight: 500;
	line-height: 1.2;
}

.stat-value {
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--accent);
}

.bottom-nav {
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	height: 80px;
	width: 90%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 1rem;
	background: hsla(0, 0%, 0%, 0.5);
	backdrop-filter: blur(15px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 500px;
	z-index: 1000;
}
@media (min-width: 768px) {
	.bottom-nav {
		position: sticky;
		top: 0;
		left: auto;
		bottom: auto;
		transform: none;
		width: 220px;
		min-width: 220px;
		height: 100vh;
		border-radius: 0;
		flex-direction: column;
		justify-content: flex-start;
		align-items: flex-start;
		padding: 2rem 1rem;
		gap: 0.5rem;
		border: none;
		border-right: 1px solid hsla(0, 0%, 100%, 0.06);
		background: hsla(0, 0%, 5%, 0.95);
	}
}

.nav-item {
	background: none;
	border: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 2px;
	color: var(--text-muted);
	width: 25%;
	cursor: pointer;
}
@media (min-width: 768px) {
	.nav-item {
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		width: 100%;
		gap: 0.8rem;
		padding: 0.75rem 1rem;
		border-radius: 12px;
		font-size: 0.95rem;
	}

	.nav-item:hover {
		background: hsla(0, 0%, 100%, 0.06);
		color: white;
	}

	.nav-item:hover img {
		opacity: 0.8;
	}
}

.nav-item img {
	width: 26px;
	opacity: 0.4;
}

.nav-item span {
	font-size: 0.8rem;
	font-weight: 400;
}
@media (min-width: 768px) {
	.nav-item img {
		width: 22px;
	}

	.nav-item span {
		font-size: 0.9rem;
	}
}

.nav-item.active {
	filter: brightness(0) saturate(100%) invert(75%) sepia(26%) saturate(3048%)
		hue-rotate(218deg) brightness(91%) contrast(92%);
}

.nav-item.active img {
	opacity: 1;
}

/* Modals */
.modal {
	opacity: 0;
	pointer-events: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: hsla(0, 0%, 0%, 0.8);
	backdrop-filter: blur(8px);
}
.modal.active {
	opacity: 1;
	pointer-events: all;
}

.modal-header-btn {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.modal-header-btn img {
	width: 32px;
	height: 32px;
}

.modal-content {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
	margin-inline: auto;
	padding: 2rem;
	border-radius: 32px;
	width: 90%;
	max-width: 400px;
	background: hsla(0, 0%, 20%, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
	.modal-content {
		max-width: 480px;
	}
}

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

.form-group {
	margin-bottom: 1rem;
	flex: 1;
}

.form-group label {
	display: block;
	font-size: 0.9rem;
	color: var(--text-muted);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
}

.form-row {
	display: flex;
	gap: 10px;
}

.form-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	padding: 1rem;
	border: none;
	border-radius: 12px;
	color: white;
	font-size: 1.1rem;
	background: hsla(0, 0%, 0%, 0.6);
}

.form-input:focus {
	outline: 2px solid var(--accent);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}

input[type="number"] {
	appearance: none;
	-moz-appearance: textfield;
}

input[list]::-webkit-calendar-picker-indicator {
	display: none !important;
}

.modal-actions {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}

.btn-confirm {
	width: 100%;
	padding: 0.8rem;
	background: var(--accent);
	border: solid 2px var(--accent);
	color: black;
	border-radius: 16px;
	font-weight: 600;
	font-size: 1.2rem;
	cursor: pointer;
}
.btn-confirm:hover {
	filter: brightness(1.1);
}

.btn-ghost {
	width: 100%;
	padding: 0.8rem;
	background: transparent;
	color: var(--accent);
	border: solid 2px var(--accent);
	border-radius: 16px;
	font-weight: 600;
	font-size: 1.2rem;
	cursor: pointer;
}
.btn-ghost:hover {
	background: hsla(142, 70%, 50%, 0.1);
}

.btn-delete {
	width: 100%;
	padding: 0.8rem;
	background: hsla(0, 70%, 45%, 0.2);
	color: var(--alert);
	border: 1px solid var(--alert);
	border-radius: 16px;
	font-weight: 600;
	font-size: 1.2rem;
	cursor: pointer;
}

.btn-delete:hover {
	background: var(--alert);
	color: white;
}

.ticket-section {
	margin-bottom: 1rem;
}

.ticket-list {
	max-height: 0px;
	overflow-y: auto;
	background: hsla(0, 0%, 0%, 0.6);
	border-radius: 8px;
	margin-bottom: 0px;
	opacity: 0;
}

.ticket-list.active {
	opacity: 1;
	max-height: 100px;
	padding: 10px;
	margin-bottom: 15px;
}

.ticket-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--text-muted);
	white-space: nowrap;
}

.ticket-item:last-child {
	border-bottom: none;
}

.ticket-item-info {
	max-width: 70%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ticket-total {
	display: flex;
	justify-content: space-between;
	font-size: 1.1rem;
	padding-top: 5px;
	border-top: 1px dashed var(--text-muted);
}

.ticket-total-amount {
	color: var(--accent);
}

.ticket-item-actions {
	display: flex;
	gap: 2px;
}

.btn-remove {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.icon-remove {
	width: 24px;
	height: 24px;
	display: block;
}

.premium-features {
	display: inline-block;
	list-style: none;
	margin-bottom: 0.5rem;
}
@media (min-width: 768px) {
	.premium-features {
		display: grid;
		grid-template-columns: 1fr 1fr;
		text-wrap: nowrap;
	}
}

.premium-features li {
	display: flex;
	align-items: center;
	font-size: 1.1rem;
	margin-bottom: 0.4rem;
}

.premium-features li::before {
	content: "";
	display: inline-block;
	width: 25px;
	height: 25px;
	margin-right: 12px;
	background-image: url("../assets/icons/check-circle-fill.svg");
	background-size: contain;
	background-repeat: no-repeat;
}

.contact-link {
	display: block;
	margin-top: 1rem;
	color: var(--accent);
	text-decoration: none;
	text-align: center;
}

.contact-link:hover {
	text-decoration: underline;
}

/* Views */
.view-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 1.5rem;
}

.search-box {
	padding: 1rem;
	display: flex;
	gap: 10px;
	align-items: center;

	background: hsla(0, 0%, 20%, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 500px;
}

.search-box img {
	width: 20px;
	opacity: 0.5;
}

.search-box input {
	background: none;
	border: none;
	color: white;
	width: 100%;
	outline: none;
	font-size: 1rem;
}

.category-pills-container {
	margin-top: 0.5rem;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 10px 0;
	scrollbar-width: none;
	height: 60px;
	mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 5%,
		black 95%,
		transparent 100%
	);
	-webkit-mask-image: linear-gradient(
		to right,
		transparent 0%,
		black 5%,
		black 95%,
		transparent 100%
	);
}
.category-pills-container::-webkit-scrollbar {
	display: none;
}

.category-pill {
	background: hsla(0, 0%, 100%, 0.1);
	padding: 8px 16px;
	height: auto;
	border-radius: 500px;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	white-space: nowrap;
	cursor: pointer;
}
@media (min-width: 768px) {
	.category-pills-container {
		flex-wrap: wrap;
		mask-image: none;
		-webkit-mask-image: none;
		height: fit-content;
	}
	.category-pill:hover {
		background: hsla(0, 0%, 100%, 0.18);
	}
}

.category-pill.active {
	background: hsl(0, 0%, 100%);
	color: hsl(0, 0%, 0%);
}

.category-pill.low-stock-pill {
	color: hsl(38, 92%, 50%);
}
.category-pill.low-stock-pill.active {
	background-color: hsl(38, 92%, 50%);
	color: hsl(0, 0%, 0%);
}

.inventory-list {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-top: 1.5rem;
}
@media (min-width: 768px) {
	.inventory-list {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

.inventory-item {
	padding: 1.2rem;
	border-radius: 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;

	background: hsla(0, 0%, 20%, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
	.inventory-item:hover {
		background: hsla(0, 0%, 25%, 0.6);
		border-color: hsla(0, 0%, 100%, 0.15);
		transform: translateY(-1px);
	}
}

.item-info {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.item-icon-box {
	background: hsla(0, 0%, 100%, 0.05);
	width: 48px;
	height: 48px;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.item-icon-box img {
	width: 24px;
	opacity: 0.7;
}

.item-details h4 {
	font-size: 1rem;
	font-weight: 500;
	margin-bottom: 2px;
}

.item-details small {
	color: var(--text-muted);
}

.stock-badge {
	font-size: 0.8rem;
	font-weight: 500;
	margin-top: 1rem;
}

.stock-badge.ok {
	color: #4ade80;
}
.stock-badge.low {
	color: #f59e0b;
}
.stock-badge.out {
	color: var(--alert);
}
.stock-badge.service {
	color: var(--accent);
}

.no-results {
	text-align: center;
	padding: 2rem;
	color: var(--text-muted);
	font-style: italic;
}

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

.item-values .quantity {
	font-size: 1rem;
	font-weight: 600;
}

.item-values .price {
	font-size: 1rem;
	margin-top: 2px;
	color: hsl(142, 69%, 58%);
}

.unified-timeline {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding-bottom: 2rem;
}

.timeline-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	border-radius: 20px;
	background: hsla(0, 0%, 20%, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.08);
	cursor: pointer;
}
@media (min-width: 768px) {
	.timeline-item:hover {
		background: hsla(0, 0%, 25%, 0.6);
		border-color: hsla(0, 0%, 100%, 0.12);
	}
}

.timeline-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
}

.timeline-icon img {
	width: 100%;
	height: 100%;
	transform: rotate(45deg);
}

.timeline-item-content {
	flex: 1;
}

.timeline-main {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.2rem;
}

.timeline-details {
	display: flex;
	justify-content: space-between;
	color: var(--text-muted);
}

.timeline-amount.type-sale {
	color: var(--accent);
}

.timeline-amount.type-receive {
	color: #1140fc;
}

.timeline-amount.type-catalog {
	color: hsl(210, 70%, 65%);
}

.timeline-info-box {
	margin: 8px 0;
	padding: 10px;
	background: rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-info-row {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	padding: 3px 0;
	color: var(--text-muted);
}

.timeline-info-row span:last-child {
	font-weight: 600;
}

.timeline-amount.type-return {
	color: var(--alert);
}

.timeline-item.returned {
	opacity: 0.8;
}

.timeline-returned-badge {
	width: 12px;
	height: auto;
}

.settings-card {
	background: hsla(0, 0%, 20%, 0.4);
	border: 1px solid hsla(0, 0%, 100%, 0.08);
	border-radius: 24px;
	padding: 1.5rem;
	margin-bottom: 1.2rem;
}

.settings-card:last-child {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.settings-card h3 {
	font-size: 1.3rem;
}

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

.settings-card .form-input {
	margin-top: 1rem;
	margin-bottom: 0;
}

.primary-btn {
	background: hsla(0, 0%, 100%, 0.05);
	border: 1px solid hsla(0, 0%, 100%, 0.1);
	color: white;
	padding: 0.8rem;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 1rem;
	width: 100%;
	margin-top: 1rem;
}
.primary-btn:hover {
	background: hsla(0, 0%, 100%, 0.1);
	border-color: hsla(0, 0%, 100%, 0.2);
}

.primary-btn img {
	width: 28px;
}

.companies-logos {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-block: 0.5rem;
}

.company-logo {
	width: 60%;
}

.version-badge {
	display: inline-block;
	padding: 2px 8px;
	background: #222;
	border-radius: 10px;
	font-size: 0.75rem;
	color: var(--text-muted);
	margin-top: 0.5rem;
}

.icon-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	margin-top: 1.5rem;
}

.icon-links a img {
	width: 38px;
	height: 38px;
	display: block;
}

.legal-links {
	margin-top: 1.5rem;
}

.legal-links a {
	color: var(--accent);
	text-decoration: none;
	font-size: 0.9rem;
	display: block;
	margin-bottom: 0.5rem;
}

.copyright {
	font-size: 0.8rem;
	color: #444;
	margin-top: 1rem;
}

.toggle-switch {
	position: relative;
	display: inline-block;
	width: 48px;
	height: 26px;
	flex-shrink: 0;
}

.toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.toggle-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: hsla(0, 0%, 100%, 0.1);
	border-radius: 500px;
}

.toggle-slider::before {
	content: "";
	position: absolute;
	width: 20px;
	height: 20px;
	left: 3px;
	bottom: 3px;
	background: white;
	border-radius: 50%;
	transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
	background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
	transform: translateX(22px);
}

.cloud-link-code {
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: 2px;
	color: var(--accent);
	margin: 0.5rem 0;
}

.sync-timestamp {
	font-size: 0.8rem;
	color: var(--text-muted);
	margin-top: 0.5rem;
}

#toast-container {
	position: fixed;
	top: 80px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 9999;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	pointer-events: none;
}

.toast {
	background: hsla(0, 0%, 18%, 0.97);
	border: 1px solid hsla(0, 0%, 100%, 0.1);
	backdrop-filter: blur(8px);
	border-radius: 12px;
	padding: 0.65rem 1.2rem;
	font-size: 0.88rem;
	color: white;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
	max-width: 95dvw;
	text-align: center;
}

.toast.toast-visible {
	opacity: 1;
	transform: translateY(0);
}

.toast.toast-success {
	border-color: var(--accent);
}

.toast.toast-error {
	border-color: var(--alert);
}

.modal-ui {
	opacity: 0;
	pointer-events: none;
	position: fixed;
	z-index: 1000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background-color: hsla(0, 0%, 0%, 0.8);
	backdrop-filter: blur(8px);
}

.modal-ui.active {
	opacity: 1;
	pointer-events: all;
}

.modal-ui-box {
	background: #1a1a1a;
	border: 1px solid hsla(0, 0%, 100%, 0.1);
	border-radius: 18px;
	padding: 1.5rem;
	width: 100%;
	max-width: 340px;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.modal-ui-message {
	font-size: 0.95rem;
	color: white;
	line-height: 1.5;
	white-space: pre-line;
}

.modal-ui-input {
	width: 100%;
	padding: 1rem;
	border: none;
	border-radius: 12px;
	color: white;
	font-size: 1.1rem;
	background: hsla(0, 0%, 0%, 0.6);
}

.modal-ui-actions {
	display: flex;
	gap: 0.6rem;
}

.modal-ui-actions .btn-confirm {
	flex: 1;
}

.modal-ui-actions .btn-cancel {
	flex: 1;
	background: hsla(0, 0%, 100%, 0.06);
	border: solid 2px hsla(0, 0%, 100%, 0.1);
	border-radius: 16px;
	color: white;
	font-size: 1.2rem;
	padding: 0.8rem;
	cursor: pointer;
}

.modal-ui-actions .btn-delete-confirm {
	flex: 1;
	padding: 0.8rem;
	background: hsla(0, 70%, 45%, 0.2);
	border: 1px solid var(--alert);
	color: var(--alert);
	border-radius: 16px;
	font-weight: 600;
	font-size: 1.2rem;
	cursor: pointer;
}
