:root {
    color-scheme: dark;
    --mosy-ink: #f5f2fa;
    --mosy-muted: #b8b2c7;
    --mosy-line: #383345;
    --mosy-paper: #1c1926;
    --mosy-paper-raised: #242130;
    --mosy-canvas: #111018;
    --mosy-purple: #873bff;
    --mosy-purple-dark: #7028e8;
    --mosy-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

body.bg-slate-950 {
    background-color: var(--mosy-canvas) !important;
    background-image:
        linear-gradient(135deg, rgba(8, 12, 27, 0.82), rgba(13, 18, 37, 0.88)),
        url("images/mosy-savdo-background.png");
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--mosy-ink) !important;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.storefront {
    background-image:
        linear-gradient(135deg, rgba(7, 12, 30, 0.78), rgba(12, 18, 35, 0.88)),
        url("images/mosy-shopping-background.png");
}

body.auth-page {
    background-image:
        linear-gradient(135deg, rgba(7, 12, 30, 0.74), rgba(12, 18, 35, 0.86)),
        url("images/mosy-admin-background.png");
}

body.role-admin {
    background-image:
        linear-gradient(135deg, rgba(7, 12, 30, 0.78), rgba(12, 18, 35, 0.88)),
        url("images/mosy-admin-background.png");
}

body.role-worker {
    background-image:
        linear-gradient(135deg, rgba(7, 12, 30, 0.78), rgba(12, 18, 35, 0.88)),
        url("images/mosy-savdo-background.png");
}

body.role-courier {
    background-image:
        linear-gradient(135deg, rgba(7, 12, 30, 0.78), rgba(12, 18, 35, 0.88)),
        url("images/mosy-shopping-background.png");
}

body {
    padding-bottom: 3.75rem !important;
}

.brand-signature {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid rgba(148, 136, 169, 0.22);
    background: rgba(17, 16, 24, 0.94);
    color: #b8b2c7;
    font-size: 0.72rem;
    text-align: center;
    backdrop-filter: blur(14px);
}

.brand-signature > span:first-child {
    color: #c8aaff;
    font-weight: 800;
}

.brand-signature strong {
    color: #f5f2fa;
}

.brand-signature-separator {
    color: #6f687e;
}

body [class*="bg-slate-900"],
body [class*="bg-slate-800"] {
    background-color: rgba(28, 25, 38, 0.88) !important;
}

.glass {
    background: rgba(28, 25, 38, 0.82) !important;
    border-color: var(--mosy-line) !important;
    box-shadow: var(--mosy-shadow);
    backdrop-filter: blur(14px);
}

body [class*="text-white"] {
    color: var(--mosy-ink) !important;
}

body [class*="text-slate-100"],
body [class*="text-slate-200"],
body [class*="text-slate-300"],
body [class*="text-gray-300"],
body [class*="text-gray-400"] {
    color: var(--mosy-muted) !important;
}

body [class*="border-white/10"],
body [class*="border-slate-800"] {
    border-color: var(--mosy-line) !important;
}

body [class*="bg-gradient-to-r"] {
    background-image: linear-gradient(110deg, #5c22c5, #7130cf 62%, #873cbf) !important;
}

body [class*="text-indigo-300"],
body [class*="text-indigo-400"],
body [class*="text-violet-300"],
body [class*="text-violet-400"] {
    color: #c8aaff !important;
}

body [class*="text-emerald-300"],
body [class*="text-emerald-400"] {
    color: #63e6a6 !important;
}

body [class*="text-cyan-300"],
body [class*="text-cyan-400"] {
    color: #67d9ed !important;
}

body [class*="text-amber-300"],
body [class*="text-amber-400"] {
    color: #ffd071 !important;
}

body [class*="text-red-300"],
body [class*="text-red-400"] {
    color: #ff9a9f !important;
}

body [class~="bg-indigo-600"],
body [class~="bg-indigo-700"] {
    background-color: var(--mosy-purple) !important;
}

body [class~="bg-emerald-600"],
body [class~="bg-emerald-700"] {
    background-color: #08794e !important;
}

body [class~="bg-cyan-600"] {
    background-color: #0e7490 !important;
}

body [class~="bg-amber-600"] {
    background-color: #854d0e !important;
}

body [class~="bg-red-600"] {
    background-color: #b91c1c !important;
}

body [class~="bg-blue-600"] {
    background-color: #1d4ed8 !important;
}

body [class~="bg-violet-600"],
body [class~="bg-purple-600"] {
    background-color: #7e22ce !important;
}

body [class~="bg-sky-600"] {
    background-color: #0369a1 !important;
}

body [class~="bg-indigo-600"]:hover,
body [class~="bg-indigo-700"]:hover,
body [class~="hover:bg-indigo-700"]:hover {
    background-color: var(--mosy-purple-dark) !important;
}

body [class~="bg-emerald-600"]:hover,
body [class~="bg-emerald-700"]:hover,
body [class~="hover:bg-emerald-700"]:hover {
    background-color: #065f46 !important;
}

body [class~="hover:bg-cyan-700"]:hover {
    background-color: #155e75 !important;
}

body [class~="hover:bg-amber-700"]:hover {
    background-color: #713f12 !important;
}

body [class~="hover:bg-red-700"]:hover {
    background-color: #991b1b !important;
}

body [class~="hover:bg-blue-700"]:hover {
    background-color: #1e40af !important;
}

body [class~="hover:bg-purple-700"]:hover,
body [class~="hover:bg-violet-700"]:hover {
    background-color: #6b21a8 !important;
}

body [class~="bg-indigo-600"],
body [class~="bg-indigo-700"],
body [class~="bg-emerald-600"],
body [class~="bg-emerald-700"],
body [class~="bg-violet-600"],
body [class~="bg-cyan-600"],
body [class~="bg-red-600"],
body [class~="bg-blue-600"],
body [class~="bg-purple-600"],
body [class~="bg-sky-600"],
body button[class*="bg-gradient-to-r"],
body a[class*="bg-gradient-to-r"] {
    color: #ffffff !important;
}

body [class~="bg-slate-700"],
body [class~="bg-slate-600"] {
    background-color: #343041 !important;
}

body input,
body select,
body textarea {
    color: var(--mosy-ink) !important;
    background-color: #211e2c !important;
    border-color: #413b50 !important;
}

body input::placeholder,
body textarea::placeholder {
    color: #aaa3b8 !important;
    opacity: 1;
}

body input:focus,
body select:focus,
body textarea:focus {
    border-color: rgba(167, 117, 255, 0.8) !important;
    box-shadow: 0 0 0 4px rgba(135, 59, 255, 0.18);
    outline: none;
}

body button,
body a[class*="rounded-xl"],
body a[class*="rounded-2xl"] {
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    backdrop-filter: blur(10px);
}

body button[class*="bg-"],
body a[class*="bg-"][class*="rounded-xl"],
body a[class*="bg-"][class*="rounded-2xl"] {
    background-image: none !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body button:active,
body a[class*="rounded-xl"]:active,
body a[class*="rounded-2xl"]:active {
    background-color: rgba(5, 150, 105, 0.88) !important;
    border-color: rgba(110, 231, 183, 0.8) !important;
    color: #ffffff !important;
    transform: scale(0.98);
}

.attendance-day {
    border: 1px solid rgba(148, 136, 169, 0.2);
}

.attendance-present {
    background: rgba(16, 185, 129, 0.22);
    color: #a7f3d0;
}

.attendance-late {
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
}

.attendance-absent {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.attendance-sunday,
.attendance-future,
.attendance-pending,
.attendance-not_started {
    background: rgba(71, 65, 84, 0.32);
    color: #c4bfd0;
}

body :focus-visible {
    outline: 3px solid rgba(176, 132, 255, 0.8);
    outline-offset: 2px;
}

.storefront-shell {
    max-width: 1320px;
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.storefront-header {
    background: rgba(28, 25, 38, 0.84) !important;
    border: 1px solid var(--mosy-line) !important;
    box-shadow: var(--mosy-shadow);
}

.storefront-header h1 {
    letter-spacing: -0.055em;
}

.storefront-header > div:first-child > p {
    letter-spacing: 0.02em;
}

.panel-links > a {
    min-height: 140px;
    background-color: #1c1926;
    border-color: var(--mosy-line) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.panel-links > a:nth-child(1) {
    background-image: linear-gradient(135deg, rgba(27, 15, 58, 0.6), rgba(28, 25, 38, 0.92) 72%), url("images/mosy-admin-background.png");
    background-position: center;
    background-size: cover;
    border-color: rgba(167, 117, 255, 0.4) !important;
}

.panel-links > a:nth-child(2) {
    background-image: linear-gradient(135deg, rgba(36, 27, 14, 0.65), rgba(28, 25, 38, 0.92) 72%), url("images/mosy-savdo-background.png");
    background-position: center;
    background-size: cover;
    border-color: rgba(255, 197, 90, 0.36) !important;
}

.panel-links > a:nth-child(3) {
    background-image: linear-gradient(135deg, rgba(8, 35, 49, 0.62), rgba(28, 25, 38, 0.92) 72%), url("images/mosy-shopping-background.png");
    background-position: center;
    background-size: cover;
    border-color: rgba(103, 217, 237, 0.35) !important;
}

.panel-links > a:nth-child(4) {
    background-image: linear-gradient(135deg, rgba(10, 39, 29, 0.62), rgba(28, 25, 38, 0.92) 72%), url("images/mosy-savdo-background.png");
    background-position: center;
    background-size: cover;
    border-color: rgba(99, 230, 166, 0.35) !important;
}

.panel-links > a:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
    transform: translateY(-3px);
}

.marketplace-hero {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    background-image: linear-gradient(112deg, rgba(39, 14, 91, 0.8), rgba(62, 19, 103, 0.72)), url("images/mosy-shopping-background.png") !important;
    background-position: center;
    background-size: cover;
    box-shadow: 0 18px 36px rgba(70, 25, 145, 0.28);
}

.marketplace-hero::after {
    position: absolute;
    top: -90px;
    right: 8%;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.045), 0 0 0 72px rgba(255, 255, 255, 0.035);
    content: "";
    pointer-events: none;
}

.marketplace-hero > div {
    position: relative;
    z-index: 1;
}

.marketplace-hero,
.marketplace-hero [class*="text-white"] {
    color: #ffffff !important;
}

.marketplace-hero a {
    color: #ffffff !important;
    background-color: rgba(20, 12, 34, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.38) !important;
}

.service-highlights > div,
.catalog-tools,
#catalog > div:first-child,
#catalog .product-card,
body main > section,
body main > article {
    border-color: var(--mosy-line) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.17);
}

.service-highlights > div {
    background-color: var(--mosy-paper) !important;
}

.catalog-tools {
    background-color: var(--mosy-paper) !important;
}

#catalog .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1rem;
}

#catalog .product-card {
    overflow: hidden;
    background-color: var(--mosy-paper) !important;
    border: 1px solid var(--mosy-line) !important;
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.17);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

#catalog .product-card:hover {
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
    transform: translateY(-4px);
}

#catalog .product-image {
    height: 220px;
    background-color: #211e2b;
    object-fit: contain;
    padding: 0.75rem;
    transition: transform 220ms ease;
}

#catalog .product-card:hover .product-image {
    transform: scale(1.035);
}

#catalog .product-card .product-info {
    min-height: 145px;
}

#catalog .product-card .product-price {
    color: #c8aaff !important;
}

#catalog .product-card > div:last-child {
    align-items: flex-end;
    flex-wrap: wrap;
}

#catalog .product-card .product-price {
    flex: 1 1 100%;
    white-space: nowrap;
}

#catalog .product-card > div:last-child > div {
    margin-left: auto;
}

body .rounded-3xl[class*="border"],
body .rounded-2xl[class*="border"] {
    border-color: var(--mosy-line);
}

body table thead {
    background-color: #262231 !important;
}

body table th,
body table td {
    border-color: var(--mosy-line) !important;
}

body img {
    max-width: 100%;
}

@media (max-width: 767px) {
    body.min-h-screen.flex {
        display: block;
    }

    body > aside.w-64,
    body > aside.w-72 {
        position: static;
        width: auto;
        min-height: auto;
    }

    body > main.ml-64,
    body > main.ml-72 {
        margin-left: 0;
        padding: 1rem;
    }

    .storefront-shell {
        padding: 0.75rem 0.25rem 2rem;
    }

    .storefront-header {
        align-items: stretch;
        padding: 1.25rem;
    }

    .storefront-header > div:last-child {
        flex-wrap: wrap;
    }

    .marketplace-hero {
        min-height: auto;
    }

    .marketplace-hero::after {
        right: -170px;
    }

    #catalog .product-image {
        height: 190px;
    }

    body table {
        min-width: 620px;
    }

    .brand-signature {
        gap: 0.3rem;
        padding-right: 0.5rem;
        padding-left: 0.5rem;
        font-size: 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
