:root {
    --background: oklch(98.5% 0.006 75);
    --foreground: oklch(22% 0.008 70);
    --card: oklch(100% 0 0);
    --primary: #005573;
    --primary-foreground: oklch(99% 0.002 85);
    --ring: #005573;
    --secondary: oklch(95.5% 0.008 80);
    --secondary-foreground: oklch(25% 0.008 70);
    --muted: oklch(96% 0.006 80);
    --muted-foreground: oklch(50% 0.012 70);
    --accent: oklch(94% 0.018 68);
    --accent-foreground: oklch(27% 0.012 65);
    --border: oklch(89% 0.008 78);
    --input: oklch(89% 0.008 78);
    --radius: 6px;
    --font-sans: "Work Sans", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, sans-serif;
    --font-display: "Instrument Serif", "IBM Plex Sans Arabic", serif;
    --header-h: 4.5rem;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
a {
    font-family: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
    background: color-mix(in oklab, var(--background) 90%, transparent);
    backdrop-filter: blur(24px);
}

.header-inner,
.wrap,
.wrap-wide,
.footer-inner {
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    max-width: 80rem;
    height: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1;
}

.brand-mark {
    display: flex;
    flex-direction: column;
    padding-inline-end: 0.75rem;
    border-inline-end: 1px solid var(--border);
}

.brand-forma {
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.3em;
}

.brand-azure {
    margin-top: 0.25rem;
    color: var(--primary);
    font-size: 8px;
    letter-spacing: 0.34em;
}

.brand-name {
    display: none;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.375rem;
}

.site-header .nav .btn:not(.btn-primary):not(.btn-outline) {
    color: var(--primary);
}

.site-header .nav .btn:not(.btn-primary):not(.btn-outline):hover {
    background: var(--accent);
    color: var(--primary);
}

.nav-home,
.nav-role {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--foreground);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.btn-sm {
    height: 2rem;
    padding-inline: 0.75rem;
}

.btn-lg {
    height: 2.5rem;
    padding-inline: 2rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: color-mix(in oklab, var(--primary) 90%, black);
    color: var(--primary-foreground);
}

.btn-outline {
    border-color: var(--input);
    background: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.btn-square {
    height: 3rem;
    border-radius: 0;
    font-size: 0.875rem;
}

.btn-square-outline {
    height: 3rem;
    border-radius: 0;
    border-color: color-mix(in oklab, var(--primary) 40%, transparent);
    background: transparent;
    color: var(--foreground);
    font-size: 0.875rem;
}

.btn-square-outline:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.login-label {
    display: none;
}

.session-chip {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.75rem;
    min-width: 0;
}

.session-who {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    color: var(--foreground);
    font-size: 0.875rem;
}

.session-email,
.session-out-label {
    display: none;
}

.session-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.session-out {
    margin: 0;
}

.icon-forward {
    transform: rotate(180deg);
}

html[dir="rtl"] .icon-forward {
    transform: none;
}

.hero {
    position: relative;
    min-height: calc(100svh - var(--header-h));
    overflow: hidden;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.hero-photo,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

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

.hero-shade {
    background: oklch(33% 0.07 238 / 35%);
}

.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: calc(100svh - var(--header-h));
    max-width: 80rem;
    margin-inline: auto;
    padding: 6rem 1.25rem 3.5rem;
}

.hero-copy {
    max-width: 48rem;
    color: var(--background);
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.32em;
}

.hero h1 {
    margin: 1.25rem 0 0;
    font-family: var(--font-display);
    font-size: 3.75rem;
    font-weight: 500;
    line-height: 1;
}

.hero-sub {
    margin: 1.25rem 0 0;
    font-size: 1.125rem;
    font-weight: 300;
}

.hero-body {
    max-width: 36rem;
    margin: 1rem 0 0;
    color: color-mix(in oklab, var(--background) 85%, transparent);
    font-size: 0.875rem;
    line-height: 1.625;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero-note,
.section-note {
    margin: 1.75rem 0 0;
    font-size: 0.75rem;
}

.hero-note {
    color: color-mix(in oklab, var(--background) 70%, transparent);
}

.packages {
    background: var(--muted);
    color: var(--foreground);
    padding: 5rem 0;
}

.packages-head {
    margin-bottom: 3rem;
    text-align: center;
}

.packages-head .eyebrow {
    margin-bottom: 1rem;
    font-size: 0.65rem;
}

.packages h2,
.includes h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
}

.packages h2 {
    font-size: 2.25rem;
}

.packages-lead {
    max-width: 42rem;
    margin: 1rem auto 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.75rem;
}

.package-rail {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    border: 1px solid var(--border);
    background: var(--border);
    box-shadow: var(--shadow-2xl);
    -webkit-overflow-scrolling: touch;
}

.package-rail::-webkit-scrollbar {
    height: 0.45rem;
}

.package-rail::-webkit-scrollbar-thumb {
    background: color-mix(in oklab, var(--foreground) 22%, transparent);
}

.package-grid {
    display: flex;
    width: max-content;
    min-width: 100%;
    gap: 1px;
    background: var(--border);
}

.package-card {
    display: flex;
    flex: 0 0 min(28rem, 80vw);
    width: min(28rem, 80vw);
    min-width: min(28rem, 80vw);
    flex-direction: column;
    scroll-snap-align: start;
    background: var(--card);
    color: var(--foreground);
}

.package-rail[data-count="1"],
.package-rail[data-count="2"] {
    overflow-x: hidden;
    scroll-snap-type: none;
}

.package-rail[data-count="1"] .package-grid,
.package-rail[data-count="2"] .package-grid {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
}

.package-rail[data-count="1"] .package-card,
.package-rail[data-count="2"] .package-card {
    flex: none;
    width: auto;
    min-width: 0;
    scroll-snap-align: unset;
}

.package-card.is-classic {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.package-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--muted);
}

.package-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease, opacity 0.7s ease;
}

.package-card.is-vip .package-media img {
    opacity: 0.85;
}

.package-card:hover .package-media img {
    transform: scale(1.05);
}

.package-card.is-vip:hover .package-media img {
    opacity: 1;
}

.badge {
    position: absolute;
    top: 1.25rem;
    inset-inline-end: 1.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.6rem;
    font-weight: 600;
}

.badge-vip {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-lg);
}

.badge-classic {
    border: 1px solid var(--border);
    background: color-mix(in oklab, var(--card) 90%, transparent);
    color: var(--foreground);
    backdrop-filter: blur(12px);
}

.package-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.75rem;
}

.package-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.package-card h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1;
}

.package-card.is-vip h3 {
    color: var(--primary);
}

.accent-bar {
    width: 3rem;
    height: 0.25rem;
    margin-top: 0.75rem;
    background: var(--primary);
}

.package-card.is-vip .accent-bar {
    width: 5rem;
}

.premium {
    border: 1px solid var(--primary);
    padding: 0.25rem 0.5rem;
    color: var(--primary);
    font-size: 0.55rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.tagline {
    min-height: 3rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.75rem;
}

.highlights {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-block: 1px solid var(--border);
}

.highlights div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.highlights div + div {
    margin-top: 0.75rem;
}

.mark {
    color: var(--primary);
}

.price-block {
    margin-top: auto;
}

.price-label,
.price-vat {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.65rem;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.25rem 0 0;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.1;
}

.package-card.is-vip .price {
    color: var(--primary);
}

.price span {
    font-size: 1rem;
    font-weight: 400;
}

.price-vat {
    margin-top: 0.25rem;
}

.package-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2rem;
}

.section-note {
    color: var(--muted-foreground);
    text-align: center;
}

.includes {
    border-block: 1px solid var(--border);
    background: color-mix(in oklab, var(--card) 35%, transparent);
}

.includes-inner {
    display: grid;
    gap: 2rem;
    max-width: 80rem;
    margin-inline: auto;
    padding: 4rem 1.25rem;
}

.includes h2 {
    font-size: 2.25rem;
}

.include-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 2rem;
}

.include-grid div {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-block: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}

.include-grid svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--primary);
}

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

.footer-inner {
    display: grid;
    gap: 2rem;
    max-width: 72rem;
    padding-block: 2.5rem;
    font-size: 0.875rem;
}

.footer-brand {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
}

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

.footer-line {
    margin: 0.25rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
}

.footer-contact p {
    margin: 0;
}

.footer-contact .hours {
    margin-top: 0.5rem;
    color: var(--muted-foreground);
}

.footer-contact .phones {
    font-weight: 500;
}

@media (min-width: 640px) {
    .header-inner,
    .hero-inner,
    .includes-inner {
        padding-inline: 1.5rem;
    }

    .header-inner {
        gap: 1rem;
    }

    .brand-name,
    .nav-home,
    .nav-role,
    .login-label,
    .session-email,
    .session-out-label {
        display: inline-flex;
    }

    .login-icon {
        display: none;
    }

    .package-body {
        padding: 2.5rem;
    }

    .package-actions {
        gap: 1rem;
    }

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

    .wrap,
    .packages-head,
    .package-rail,
    .section-note {
        padding-inline: 0;
    }
}

@media (min-width: 768px) {
    .hero-inner {
        padding-bottom: 5rem;
    }

    .hero h1 {
        font-size: 6rem;
    }

    .hero-sub {
        font-size: 1.5rem;
    }

    .hero-body {
        font-size: 1rem;
    }

    .packages {
        padding-block: 7rem;
    }

    .packages-head {
        margin-bottom: 4rem;
    }

    .packages h2 {
        font-size: 3.75rem;
    }

    .package-rail:not([data-count="1"]):not([data-count="2"]) .package-card {
        flex-basis: 28rem;
        width: 28rem;
        min-width: 28rem;
    }

    .package-rail[data-count="2"] .package-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .footer-contact {
        text-align: end;
    }
}

@media (min-width: 1024px) {
    .includes-inner {
        grid-template-columns: 0.7fr 1.3fr;
        align-items: start;
    }
}

.packages > .wrap {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

@media (min-width: 640px) {
    .packages > .wrap {
        padding-inline: 1.5rem;
    }
}

.pkg-page {
    max-width: 72rem;
    margin-inline: auto;
    padding: 3rem 1.25rem 4rem;
}

.pkg-kicker {
    margin: 0;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3em;
}

.pkg-page h1 {
    margin: 0.75rem 0 0;
    font-size: 2.25rem;
    font-weight: 300;
    letter-spacing: 0.16em;
    line-height: 1.1;
}

.pkg-sub {
    margin: 0.75rem 0 0;
    color: var(--muted-foreground);
    font-size: 1.125rem;
}

.pkg-gallery {
    display: grid;
    gap: 1px;
    margin-top: 2rem;
    background: var(--border);
}

.pkg-shot {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: var(--background);
}

.pkg-shot img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.pkg-shot:hover img {
    transform: scale(1.025);
}

.pkg-shot figcaption {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    background: color-mix(in oklab, var(--background) 80%, transparent);
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    backdrop-filter: blur(8px);
}

.pkg-prices {
    margin-top: 3rem;
    border: 1px solid var(--border);
    padding: 1.5rem;
}

.pkg-prices h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.tier-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.tier-card {
    border: 1px solid var(--border);
    padding: 1.25rem;
}

.tier-name,
.tier-desc,
.tier-label,
.tier-amount {
    margin: 0;
}

.tier-name {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.22em;
}

.tier-desc {
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.tier-label {
    margin-top: 1rem;
    color: var(--muted-foreground);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.18em;
}

.tier-label.is-primary,
.tier-amount.is-primary,
.item-qty {
    color: var(--primary);
}

.tier-amount {
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.35;
}

.tier-rule {
    height: 1px;
    margin: 1rem 0;
    background: var(--border);
}

.tier-list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.tier-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.tier-list li + li {
    margin-top: 0.5rem;
}

.tier-list svg {
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
    flex: 0 0 auto;
    color: var(--primary);
}

.item-title {
    color: var(--foreground);
}

.item-spec,
.item-qty,
.item-detail {
    display: block;
    font-size: 0.75rem;
}

.item-detail {
    margin-top: 0.15rem;
    color: var(--muted-foreground);
    line-height: 1.5;
    white-space: pre-line;
}

.pkg-note {
    margin: 1rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.pkg-order {
    margin-top: 1.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .pkg-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .tier-grid {
        grid-template-columns: repeat(var(--tier-count, 2), minmax(0, 1fr));
    }

    .pkg-order {
        width: auto;
    }
}

@media (min-width: 768px) {
    .pkg-page h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .pkg-gallery {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.auth-page {
    max-width: 28rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    padding: 3.5rem 1.25rem 4rem;
}

.auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 400;
    line-height: 1.2;
}

.auth-lead {
    margin: 0.5rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.auth-package {
    margin-top: 1.25rem;
    border: 1px solid color-mix(in oklab, var(--primary) 30%, transparent);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--secondary) 50%, transparent);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.auth-package-label {
    color: var(--muted-foreground);
}

.auth-package-code {
    color: var(--primary);
    font-weight: 600;
}

.auth-card {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: var(--card);
    box-shadow: 0 24px 60px -34px color-mix(in oklab, var(--foreground) 28%, transparent);
    padding: 1.5rem;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 2.25rem;
    align-items: center;
    border-radius: 0.5rem;
    background: var(--muted);
    padding: 0.25rem;
    color: var(--muted-foreground);
}

.auth-tab {
    height: 100%;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.auth-tab.is-active {
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.auth-form[hidden],
.auth-field[hidden],
.auth-tabs[hidden],
.auth-text-btn[hidden],
.auth-alert[hidden] {
    display: none;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-field label {
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-field input {
    height: 2.25rem;
    width: 100%;
    border: 1px solid var(--input);
    border-radius: 6px;
    background: transparent;
    padding: 0.25rem 0.75rem;
    color: var(--foreground);
    font: inherit;
    font-size: 1rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.auth-field input:focus {
    outline: 1px solid var(--primary);
}

.auth-code-row {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    direction: ltr;
}

.auth-field .auth-code-row input.auth-code {
    width: 3.25rem;
    height: 3.25rem;
    flex: 0 0 3.25rem;
    padding: 0;
    text-align: center;
    font-size: 1.25rem;
    letter-spacing: 0;
}

.auth-note {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.auth-submit,
.auth-google {
    width: 100%;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.85;
}

.auth-submit-wait {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-submit-wait[hidden],
.auth-submit-label[hidden] {
    display: none;
}

.auth-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    animation: auth-spin 0.7s linear infinite;
}

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

.auth-text-btn {
    border: 0;
    background: transparent;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

#mode-toggle {
    margin-top: 1rem;
}

.auth-text-btn:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.auth-divider span:first-child,
.auth-divider span:last-child {
    height: 1px;
    flex: 1;
    background: var(--border);
}

.auth-alert {
    margin: 1rem 0 0;
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
}

.auth-alert.is-error {
    background: color-mix(in oklab, oklch(62% 0.2 25) 12%, white);
    color: oklch(42% 0.16 25);
}

.auth-alert.is-success {
    background: color-mix(in oklab, var(--primary) 10%, white);
    color: var(--primary);
}

.account-page {
    max-width: 48rem;
    margin-inline: auto;
    padding: 3.5rem 1.25rem 4rem;
}

.account-compound + .account-compound {
    margin-top: 1rem;
}

.account-compound {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--card);
    padding: 1rem 1.25rem;
}

.account-compound h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 500;
}

.account-meta {
    margin: 0.25rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.account-units {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.account-units li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding: 0.65rem 0;
    font-size: 0.875rem;
}

.account-units span {
    color: var(--muted-foreground);
}

.order-page {
    max-width: 56rem;
    margin-inline: auto;
    padding: 3rem 1.25rem 4rem;
}

.orders-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.orders-head .btn {
    flex: 0 0 auto;
}

.orders-new {
    height: 2.25rem;
    padding-inline: 1rem;
    font-size: 0.875rem;
}

.order-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.order-step {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.order-step.is-on,
.order-step.is-done {
    border-color: var(--primary);
    color: var(--primary);
}

.order-step.is-done {
    background: color-mix(in oklab, var(--primary) 10%, transparent);
}

.order-card {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--card);
    padding: 1.5rem;
}

.order-card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.order-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.order-lead {
    margin: 0.35rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.order-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.order-choice {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: transparent;
    padding: 1rem;
    color: var(--foreground);
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.order-choice.is-on {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 10%, transparent);
}

.order-choice strong,
.order-choice span {
    display: block;
}

.order-choice span,
.order-muted {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.order-price {
    margin-top: 0.5rem;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.order-list {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.order-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.order-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 0;
}

.order-list .order-price {
    margin-top: 0;
    white-space: nowrap;
}

.order-copy strong {
    display: block;
    color: var(--foreground);
    font-weight: 600;
}

.order-copy .item-spec,
.order-copy .item-detail {
    display: block;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.order-list li:first-child {
    border-top: 0;
}

.order-rows {
    margin: 1rem 0 0;
}

.order-rows div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.order-rows dt {
    color: var(--muted-foreground);
}

.order-rows dd {
    margin: 0;
    font-weight: 500;
}

.order-rows dd.is-strong {
    color: var(--primary);
    font-size: 1.125rem;
    font-weight: 600;
}

.order-contract {
    max-height: 14rem;
    overflow: auto;
    margin: 0.75rem 0 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--secondary) 40%, transparent);
    padding: 1rem;
    white-space: pre-wrap;
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.75rem;
    line-height: 1.6;
}

.order-file,
.order-pad {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--secondary) 40%, transparent);
    padding: 0.75rem;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;
}

.ka-drop {
    position: relative;
    margin-top: 0.75rem;
}

.ka-drop-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.ka-drop-zone {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--secondary) 40%, transparent);
    padding: 1.15rem 1rem;
    text-align: center;
    cursor: pointer;
}

.ka-drop.is-over .ka-drop-zone,
.ka-drop-zone:hover {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 8%, #fff);
}

.ka-drop.is-missing .ka-drop-zone {
    outline: 2px solid oklch(62% 0.2 25);
    outline-offset: 3px;
}

.ka-drop-zone strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.ka-drop-zone span {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.ka-drop-list {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.ka-drop-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: #fff;
    padding: 0.5rem 0.65rem;
}

.ka-drop-thumb {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.45rem;
    background: var(--muted) center / cover no-repeat;
}

.ka-drop-thumb.is-pdf {
    display: grid;
    place-items: center;
    background: #e11d48;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
}

.ka-drop-meta {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.ka-drop-meta strong {
    overflow: hidden;
    font-size: 0.8125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ka-drop-meta em {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-style: normal;
}

.ka-drop-x {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 999px;
    background: color-mix(in oklab, var(--muted) 80%, #fff);
    color: var(--foreground);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.order-pad {
    height: 9rem;
    cursor: crosshair;
    touch-action: none;
}

.order-agree {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.order-agree.is-missing,
.order-pad.is-missing,
.order-file.is-missing {
    outline: 2px solid oklch(62% 0.2 25);
    outline-offset: 3px;
    border-radius: 0.75rem;
}

.order-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.order-list-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 1rem;
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--card);
    padding: 1.25rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.order-list-card:hover {
    border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

.order-list-card strong {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.order-unread,
.notice-bell-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding-inline: 0.3rem;
    border-radius: 999px;
    background: oklch(62% 0.2 25);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}

.notice-bell {
    position: relative;
}

.notice-bell-btn {
    position: relative;
}

.notice-bell-badge {
    position: absolute;
    top: -0.2rem;
    inset-inline-end: -0.15rem;
}

.notice-bell-badge[hidden],
.notice-bell-menu[hidden] {
    display: none;
}

.notice-bell-menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.45rem);
    inset-inline-end: 0;
    width: min(20rem, calc(100vw - 2rem));
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: var(--shadow-lg);
    padding: 0.35rem;
}

.notice-bell-empty {
    margin: 0;
    padding: 0.7rem;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.notice-bell-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    border-radius: 0.5rem;
    padding: 0.55rem 0.65rem;
}

.notice-bell-item:hover {
    background: var(--muted);
}

.notice-bell-item strong {
    font-size: 0.8125rem;
}

.notice-bell-item span,
.notice-bell-item time {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.order-list-side {
    text-align: end;
}

.order-list-amount {
    margin: 0;
    font-weight: 600;
}

.order-list-amount span,
.order-badge {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 500;
}

.order-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.35rem;
    border: 1px solid color-mix(in oklab, var(--muted-foreground) 20%, transparent);
    border-radius: 999px;
    background: var(--muted);
    padding: 0.25rem 0.625rem;
}

.order-badge::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 999px;
    background: currentColor;
}

.order-list-card .order-progress {
    grid-column: 1 / -1;
    border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
    padding-top: 1rem;
}

.order-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
}

.order-progress-top strong {
    color: var(--foreground);
    font-weight: 600;
}

.order-track {
    position: relative;
    display: flex;
    align-items: center;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--muted);
}

.order-track-fill {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    border-radius: 999px;
    background: var(--primary);
}

.order-track-dots {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.order-dot {
    width: 0.625rem;
    height: 0.625rem;
    border: 1px solid var(--background);
    border-radius: 999px;
    background: color-mix(in oklab, var(--muted-foreground) 25%, transparent);
}

.order-dot.is-on {
    background: var(--primary);
}

.order-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.order-hero .auth-title {
    margin: 0;
}

.order-hero .order-badge {
    margin-top: 0.35rem;
    flex: 0 0 auto;
}

.order-rows dd.is-primary {
    color: var(--primary);
    font-weight: 600;
}

.order-heading-icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--primary);
}

.order-pay-note {
    margin: 0.5rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    line-height: 1.6;
}

.order-pay-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1.25rem;
    text-align: center;
}

.order-pay-list {
    display: grid;
    gap: 0;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.order-pay-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid var(--border);
}

.order-pay-row:first-child {
    border-top: 0;
}

.order-pay-row-main {
    min-width: 0;
    flex: 1;
}

.order-pay-row-side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.order-pay-row-side strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.order-final-pay .order-pay-note {
    margin-top: 0.5rem;
}

.order-final-pay .pay-columns {
    margin-top: 1.15rem;
}

.order-final-pay .order-choice {
    min-height: 4.75rem;
    padding: 1.1rem 1.15rem;
}

.order-final-pay form {
    margin: 0;
}

.order-docs {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .order-docs {
        grid-template-columns: 1fr 1fr;
    }
}

.order-doc {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--card) 60%, transparent);
    padding: 1rem;
}

a.order-doc {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a.order-doc:hover {
    border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
}

.order-doc-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.order-doc-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    padding: 0.5rem;
    color: var(--primary);
}

.order-doc-icon svg {
    width: 1rem;
    height: 1rem;
}

.order-doc-title {
    margin: 0;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-doc-meta {
    margin: 0.15rem 0 0;
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-doc-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    border-color: transparent;
    border-radius: 0.375rem;
    background: var(--secondary);
    color: var(--secondary-foreground);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.order-doc-preview:hover {
    background: color-mix(in oklab, var(--secondary) 80%, var(--foreground));
    color: var(--secondary-foreground);
}

.order-doc-preview svg {
    width: 0.875rem;
    height: 0.875rem;
}

.order-file-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.order-file-tile {
    display: grid;
    gap: 0.35rem;
    width: 5.75rem;
    color: inherit;
    text-decoration: none;
}

.order-file-thumb {
    display: grid;
    place-items: center;
    width: 5.75rem;
    height: 5.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--muted) center / cover no-repeat;
}

.order-file-thumb.is-pdf {
    background: #fff5f5;
}

.order-file-pdf {
    display: grid;
    place-items: center;
    width: 2.55rem;
    height: 3.1rem;
    border-radius: 0.3rem;
    background: #e11d48;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 10px rgb(225 29 72 / 0.28);
}

.order-file-name {
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.3;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-file-time {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted-foreground);
    font-size: 0.65rem;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
}

.order-pay-status.is-rejected,
.order-pay-row.is-rejected .order-pay-status {
    color: #dc2626;
    font-weight: 600;
}

.order-doc .order-contract {
    margin-top: 0.75rem;
}

.order-stages {
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.order-stages li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.order-stages li + li {
    margin-top: 1rem;
}

.order-stages svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.order-stages li.is-on {
    color: var(--foreground);
    font-weight: 500;
}

.order-stages li.is-on svg {
    color: var(--primary);
}

.order-stages time {
    margin-inline-start: auto;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 400;
}

.pay-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
    align-items: stretch;
}

.pay-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
}

.pay-column .order-choice {
    width: 100%;
}

.pay-panel.is-off {
    opacity: 0.45;
}

.pay-panel {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-top: 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.1rem 1.15rem;
}

.pay-panel .auth-form {
    margin-top: 0.9rem;
}

.pay-panel .auth-submit {
    margin-top: auto;
}

.pay-success {
    margin-top: 0;
}

@media (min-width: 640px) {
    .pay-columns {
        grid-template-columns: 1fr 1fr;
    }

    .order-grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }

    .order-grid.cols-3 {
        grid-template-columns: 1fr 1fr 1fr;
    }

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

.order-chat-launch[hidden] {
    display: none;
}

.order-chat-launch {
    position: fixed;
    z-index: 45;
    bottom: 1.25rem;
    inset-inline-start: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    max-width: calc(100vw - 2.5rem);
    height: 2.75rem;
    padding-inline: 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-lg);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.order-chat-launch svg,
.order-chat-close svg,
.order-chat-tools svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.order-chat-badge {
    position: absolute;
    top: -0.4rem;
    inset-inline-end: -0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding-inline: 0.3rem;
    border-radius: 999px;
    background: oklch(62% 0.2 25);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
}

.order-chat-badge[hidden],
.order-chat-count[hidden],
.order-chat[hidden],
.order-chat-preview[hidden] {
    display: none;
}

.order-chat {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.order-chat-dim {
    position: absolute;
    inset: 0;
    border: 0;
    background: oklch(25% 0.02 70 / 55%);
    cursor: pointer;
}

.order-chat-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    display: flex;
    flex-direction: column;
    width: min(26rem, 100%);
    background: var(--background);
    box-shadow: var(--shadow-2xl);
}

.order-chat-head {
    padding: 1.25rem 1.25rem 0.75rem;
}

.order-chat-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.order-chat-title h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.05rem;
    font-weight: 600;
}

.order-chat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding-inline: 0.35rem;
    border-radius: 999px;
    background: oklch(62% 0.2 25);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.order-chat-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-inline-start: auto;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
}

.order-chat-head p {
    margin: 0.35rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.order-chat-log {
    flex: 1;
    overflow: auto;
    padding: 0.5rem 1.25rem 1rem;
}

.order-chat-empty,
.order-chat-error {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.order-chat-error {
    padding: 0 1.25rem 0.5rem;
    color: oklch(45% 0.16 25);
}

.order-chat-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 0.9rem;
}

.order-chat-row.is-mine {
    align-items: flex-end;
}

.order-chat-meta {
    margin-bottom: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.order-chat-bubble {
    max-width: 85%;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.7rem 0.85rem;
    font-size: 0.875rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.order-chat-row.is-mine .order-chat-bubble {
    border-color: transparent;
    background: oklch(94% 0.015 230);
}

.order-chat-bubble img,
.order-chat-bubble video {
    display: block;
    width: min(14rem, 70vw);
    max-height: 12rem;
    margin-bottom: 0.4rem;
    border-radius: 0.5rem;
    object-fit: cover;
    cursor: pointer;
}

.order-chat-bubble a {
    color: var(--primary);
    font-weight: 600;
}

.order-chat-form {
    padding: 0.75rem 1.25rem 1.25rem;
}

.order-chat-form textarea {
    width: 100%;
    min-height: 5.5rem;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.75rem 0.85rem;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;
}

.order-chat-tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.order-chat-tools .btn {
    height: 2.25rem;
    padding-inline: 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.8125rem;
}

.order-chat-hint {
    margin: 0.45rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    line-height: 1.5;
}

.order-chat-preview {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: oklch(20% 0.02 70 / 88%);
}

.order-chat-preview img,
.order-chat-preview video {
    max-width: 92%;
    max-height: 88%;
    object-fit: contain;
}

.order-chat-preview button {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--foreground);
    font-size: 1.25rem;
    cursor: pointer;
}

.order-design-card {
    overflow: hidden;
    padding: 0;
}

.order-design-banner {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.order-design-banner img {
    width: 100%;
    height: 10rem;
    object-fit: cover;
}

.order-design-banner-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    padding: 1.25rem 1.5rem;
}

.order-design-banner-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--foreground);
    font-family: "Instrument Serif", "IBM Plex Sans Arabic", serif;
    font-size: 1.5rem;
}

.order-design-banner-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
    flex-shrink: 0;
}

.order-design-status {
    padding: 1.25rem 1.5rem;
}

.order-design-status.is-ok {
    background: color-mix(in oklab, var(--secondary) 40%, transparent);
}

.order-design-status.is-back {
    background: color-mix(in oklab, oklch(62% 0.2 25) 5%, transparent);
}

.order-design-status h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.order-design-status h2 svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.order-design-body {
    padding: 1.5rem;
}

.order-design-files {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.order-design-files h3,
.design-price-block h3 {
    margin: 0;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 600;
}

.design-price-block {
    margin: 0 0 1.5rem;
}

nav.design-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    nav.design-steps {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        flex-direction: unset;
    }
}

button.design-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
    min-height: 3.5rem;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--background);
    padding: 0.85rem 1rem;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: start;
    white-space: normal;
    cursor: pointer;
}

button.design-step > span:last-child {
    flex: 1 1 0;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.design-step:disabled {
    opacity: 0.55;
    cursor: default;
}

.design-step.is-on {
    border-color: color-mix(in oklab, var(--primary) 45%, var(--border));
    color: var(--foreground);
    font-weight: 600;
}

.design-step.is-done .design-step-num,
.design-step.is-on .design-step-num {
    background: var(--primary);
    color: var(--primary-foreground);
}

.design-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.design-panel > .btn.auth-submit {
    margin-top: 1.25rem;
    width: 100%;
}

.design-q {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.design-comp-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.design-comp-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.design-comp-list li:first-child {
    border-top: 0;
}

.design-comp-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.design-comp-name {
    margin: 0;
    font-weight: 600;
}

.design-comp-meta {
    margin: 0.25rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.design-comp-change {
    color: var(--primary);
    font-size: 0.75rem;
}

.design-latest {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid color-mix(in oklab, var(--primary) 40%, var(--border));
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--primary) 5%, #fff);
}

.design-latest-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.design-latest-head svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.design-latest-head strong {
    font-size: 0.875rem;
    font-weight: 600;
}

.design-version-note {
    margin: 0 0 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    line-height: 1.55;
}

.design-file-stack {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

@media (min-width: 640px) {
    .design-file-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.design-prev-block {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.design-file-card {
    display: grid;
    min-width: 0;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--card) 60%, #fff);
}

.design-file-top {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.design-file-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    color: var(--primary);
}

.design-file-icon svg {
    width: 1rem;
    height: 1rem;
}

.design-file-copy {
    min-width: 0;
    flex: 1;
}

.design-file-title {
    margin: 0;
    overflow: hidden;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-file-meta {
    margin: 0.15rem 0 0;
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.design-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding-inline: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
}

.design-file-btn svg {
    width: 0.875rem;
    height: 0.875rem;
    margin-inline-end: 0.25rem;
    flex-shrink: 0;
}

.design-file-btn-preview {
    border: 1px solid transparent;
    background: var(--secondary);
    color: var(--secondary-foreground);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.design-file-btn-preview:hover {
    background: color-mix(in oklab, var(--secondary) 80%, var(--foreground));
}

.design-file-btn-download {
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow);
}

.design-file-btn-download:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

.design-versions,
.design-history {
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 0.95rem 1rem;
    background: var(--card);
}

.design-versions summary,
.design-history summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    list-style: none;
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 700;
}

.design-versions summary::-webkit-details-marker,
.design-history summary::-webkit-details-marker {
    display: none;
}

.design-versions summary::after,
.design-history summary::after {
    margin-inline-start: auto;
    width: 0.45rem;
    height: 0.45rem;
    border-inline-end: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    content: "";
}

.design-versions[open] summary::after,
.design-history[open] summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.design-history summary svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.design-versions-body,
.design-history ol {
    margin: 0.85rem 0 0;
}

.design-prev-block + .design-prev-block {
    margin-top: 0.75rem;
}

.design-history ol {
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.95rem;
}

.design-history li p {
    margin: 0;
    font-size: 0.875rem;
}

.design-history-title {
    color: var(--primary);
    font-weight: 600;
    line-height: 1.55;
}

.design-history-meta {
    margin-top: 0.15rem !important;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.design-comp-delta {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.design-totals {
    margin-top: 1.25rem;
}

.design-choice-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.design-choice {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: var(--card);
    padding: 1rem;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.design-choice:hover,
.design-choice.is-on {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 10%, transparent);
}

.design-choice-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.design-choice-sub {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.design-editor {
    margin-top: 1.25rem;
}

.design-chat-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--primary) 5%, transparent);
    padding: 1rem;
}

.design-chat-nudge-title {
    margin: 0;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.design-comp-editor {
    display: grid;
    gap: 0.85rem;
}

.design-comp-card {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
}

.design-comp-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.design-ask {
    margin-top: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    padding: 0.35rem 0.75rem;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.design-ask:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.design-comp-fields {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.design-comp-fields label {
    display: grid;
    gap: 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.design-comp-fields input,
.design-comp-fields select {
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--background);
    padding: 0 0.75rem;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;
}

.design-sticky-bar {
    position: sticky;
    bottom: 0.75rem;
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--card) 92%, transparent);
    padding: 1rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    backdrop-filter: blur(8px);
}

.design-sticky-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.design-sticky-row strong {
    color: var(--primary);
}

.design-sticky-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.design-sticky-actions .btn {
    width: 100%;
    min-height: 2.75rem;
    pointer-events: auto;
    cursor: pointer;
}

.design-sticky-bar {
    z-index: 30;
}

.design-sel-msg {
    margin: 0.65rem 0 0;
    font-size: 0.8rem;
}

.design-sel-msg.is-ok {
    color: var(--primary);
}

.design-sel-msg.is-error {
    color: oklch(45% 0.18 25);
}

.order-chat-locked {
    margin: 0;
    border-top: 1px solid var(--border);
    background: color-mix(in oklab, var(--secondary) 45%, transparent);
    padding: 0.9rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.8rem;
    text-align: center;
}

.order-chat-panel.is-locked .order-chat-log {
    flex: 1;
}

.design-sign-box {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in oklab, var(--secondary) 30%, transparent);
    padding: 1rem;
}

.design-decide {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.design-reject {
    border-color: color-mix(in oklab, oklch(55% 0.2 25) 55%, var(--border));
    color: oklch(45% 0.18 25);
}

.design-reject-field {
    display: grid;
    gap: 0.4rem;
    margin-top: 1rem;
}

.design-reject-field textarea {
    width: 100%;
    min-height: 5.5rem;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.75rem 0.85rem;
    color: var(--foreground);
    font: inherit;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .order-design-banner {
        flex-direction: row;
    }

    .order-design-banner img {
        width: 16rem;
        height: auto;
        min-height: 100%;
    }

    .design-choice-grid,
    .design-comp-fields,
    .design-sticky-actions,
    .design-decide {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 639px) {
    .order-page {
        padding: 1.1rem 0.9rem 5.75rem;
    }

    .orders-head {
        gap: 0.75rem;
    }

    .orders-new {
        width: 100%;
        justify-content: center;
    }

    .order-hero {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .order-card {
        padding: 1rem;
        border-radius: 0.85rem;
    }

    .order-list-card {
        grid-template-columns: 1fr;
        padding: 1rem;
        row-gap: 0.75rem;
    }

    .order-list-side {
        text-align: start;
    }

    .order-rows div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .order-pay-row {
        flex-direction: column;
        align-items: stretch;
    }

    .order-pay-row-side {
        justify-content: space-between;
    }

    .order-stages li {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .order-stages time {
        width: 100%;
        margin-inline-start: 1.75rem;
        margin-top: 0.15rem;
    }

    .order-progress-top {
        gap: 0.35rem;
        flex-wrap: wrap;
    }

    .order-chat-launch {
        bottom: max(0.85rem, env(safe-area-inset-bottom));
        inset-inline-start: max(0.85rem, env(safe-area-inset-left));
    }

    .order-chat-panel {
        width: 100%;
        inset-inline-end: 0;
    }

    .order-chat-head,
    .order-chat-form {
        padding-inline: 0.9rem;
    }

    .order-chat-form {
        padding-bottom: max(0.9rem, env(safe-area-inset-bottom));
    }

    .order-chat-form textarea {
        min-height: 4.25rem;
    }

    .order-chat-tools {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .order-chat-tools .btn {
        flex: 1 1 auto;
    }

    .order-file-time {
        font-size: 0.62rem;
    }
}
