:root {
    --bg: #030303;
    --card: rgba(255, 255, 255, 0.03);
    --card-hover: rgba(255, 255, 255, 0.06);
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.6);
    --accent: #d4af37; /* Metallic Gold */
    --accent-glow: rgba(212, 175, 55, 0.3);
    --border: rgba(255, 255, 255, 0.1);
    --shiny-border: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.4) 100%);
    --radius: 28px;
    --space-1: 12px;
    --space-2: 20px;
    --space-3: 32px;
    --space-4: 56px;
    --space-5: 80px;
}

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

html,
body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Sora', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a, a:visited, a:hover, a:active, a:focus {
    color: inherit;
    text-decoration: none !important;
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    white-space: nowrap;
    border: none;
    color: #fff;
    background: transparent;
}

/* Small button variant for navbar */
.btn-sm {
    padding: 10px 20px;
    font-size: 0.75rem;
}

a:not(.btn):not(.brand):not(.nav-links a) {
    color: var(--accent);
    transition: all 0.3s ease;
    position: relative;
}

a:not(.btn):not(.brand):not(.nav-links a)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

a:not(.btn):not(.brand):not(.nav-links a):hover {
    color: #fff;
}

a:not(.btn):not(.brand):not(.nav-links a):hover::after {
    width: 100%;
}


/* --- Shiny Shadows in Background --- */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}

body::before {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    animation: floating-glow 15s infinite alternate;
}

body::after {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, #5b21b6, transparent 70%);
    animation: floating-glow 20s infinite alternate-reverse;
}

@keyframes floating-glow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.2); }
}

.container {
    width: min(1300px, 94vw);
    margin: 0 auto;
}

.site-main {
    padding-bottom: 120px;
}

h1, h2, h3, h4 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}

h1 { font-size: clamp(3rem, 7vw, 5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.8rem); }

/* --- Site Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 3, 3, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.brand {
    font-family: 'Syne', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 48px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.1));
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
    width: 100%;
}

/* --- Nav Actions (User Chip + Logout) --- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-chip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.user-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.logout-form .btn {
    padding: 10px 24px;
    font-size: 0.8rem;
}

/* --- Premium Buttons --- */
.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    background: #fff;
    color: #000;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-soft {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.4);
    backdrop-filter: blur(10px);
}

.btn-soft:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 15px 45px var(--accent-glow);
    transform: translateY(-5px) scale(1.03);
}


/* --- Glass Cards with Shiny Borders --- */
.card, .hero-box, .panel, .showcase-panel {
    background: var(--card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.card::before, .hero-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent, rgba(255,255,255,0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.card:hover {
    background: var(--card-hover);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
}

/* --- Hero Section --- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    min-height: 85vh;
    padding-top: 40px;
}

.hero-box {
    border-color: rgba(255, 255, 255, 0.05);
}

.eyebrow {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    margin-bottom: 24px;
    display: block;
}

.hero h1 {
    margin-bottom: 32px;
}

.hero-lead {
    font-size: 1.3rem;
    color: var(--muted);
    font-weight: 300;
    max-width: 48ch;
    margin-bottom: 48px;
}

.hero-visual {
    position: relative;
    height: 700px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
}

.hero-slider-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-slide.is-active.zoom-in {
    animation: ken-burns-in 10s linear infinite alternate;
}

.hero-slide.is-active.zoom-out {
    animation: ken-burns-out 10s linear infinite alternate;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(3,3,3,0.85) 100%);
}

@keyframes ken-burns-in {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

@keyframes ken-burns-out {
    0% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.1);
    z-index: 20;
}

.slider-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.hero-showcase {
    position: absolute;
    bottom: 24px;
    left: 24px;
    right: 24px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.showcase-panel {
    padding: 32px;
    background: rgba(3, 3, 3, 0.6);
}

.showcase-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.showcase-list span {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 6px;
}

.showcase-list strong {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
}

.showcase-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.showcase-stat {
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.showcase-stat strong {
    display: block;
    font-size: 2.8rem;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
}

.showcase-stat p {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Section Styling --- */
.section-title {
    text-align: center;
    margin: var(--space-5) 0 var(--space-4);
}

.grid {
    display: grid;
    gap: 32px;
}

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

.card {
    transition: all 0.3s ease;
}

.card:hover {
    background: var(--bg-alt);
}

.about-shell {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-story {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-story p {
    font-size: 1.4rem;
    font-family: 'Syne', sans-serif;
    font-style: italic;
    color: #fff;
    margin-bottom: 24px;
}

.tile-icon {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.tile-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.3em;
    margin-bottom: 12px;
    display: block;
}

.feature-tile h3 {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.feature-tile p {
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- Experience Band --- */
.experience-band {
    padding: var(--space-5) 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05), transparent 70%);
}

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

.polish-card h3 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: var(--accent);
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

.contact-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    display: block;
}

.showcase-label-alt {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 12px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 20px;
    }
    .hero-visual { height: 500px; }
    .grid-3 { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    h1 { font-size: 2.8rem; }
    .hero-box, .card, .panel { padding: 30px; }
    .showcase-stats-row { grid-template-columns: 1fr; }
}

.grid {
    display: grid;
    gap: var(--space-2);
}

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

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

.card,
.panel,
.form-card {
    padding: 22px;
}

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

.card {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(175, 125, 47, 0.48);
    box-shadow: 0 15px 35px rgba(45, 31, 10, 0.12);
}

.card::after {
    content: '';
    position: absolute;
    inset: -30% auto auto -120%;
    width: 60%;
    height: 200%;
    transform: rotate(20deg);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transition: left .6s ease;
    pointer-events: none;
}

.card:hover::after {
    left: 170%;
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kpi strong {
    font-size: 1.8rem;
    color: #5c4518;
}

.form-grid {
    display: grid;
    gap: var(--space-2);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.input,
select,
textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    font: inherit;
    transition: all 0.3s ease;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d4af37'%3E%3Cpath d='M12 16L6 10H18L12 16Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 24px;
    padding-right: 48px;
    background-color: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
}

select option {
    background: #1a1a1a;
    color: #fff;
    padding: 12px 16px;
}

select option:hover,
select option:focus {
    background: rgba(212, 175, 55, 0.2);
}

.input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(255,255,255,0.08);
}

select:focus {
    background-color: rgba(212, 175, 55, 0.15);
}

.input-error,
select.input-error,
textarea.input-error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #a33b3b;
    font-size: .84rem;
}

.section-gap-sm {
    margin-top: 14px;
}

.section-gap-md {
    margin-top: 20px;
}

.section-gap-lg {
    margin-top: 24px;
}

label {
    display: block;
    font-size: .85rem;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
    margin-top: var(--space-2);
}

.sticky-actions {
    position: sticky;
    bottom: 24px;
    padding: 16px 24px;
    margin-top: var(--space-4);
    border: 1px solid rgba(175, 125, 47, 0.22);
    border-radius: 20px;
    background: rgba(255, 252, 244, 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 -10px 40px rgba(45, 31, 10, 0.1);
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Skeleton Loader --- */
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0ede4 25%, #f7f4ed 50%, #f0ede4 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: 8px;
    display: block;
}

.skeleton-text { height: 1em; width: 100%; margin-bottom: 0.5em; }
.skeleton-title { height: 2em; width: 60%; margin-bottom: 1em; }
.skeleton-card { height: 200px; width: 100%; border-radius: var(--radius); }

.is-loading .card,
.is-loading .panel {
    visibility: hidden;
}

.is-loading .skeleton-wrap {
    display: block !important;
}

/* --- Print Refinements --- */
@media print {
    .site-header,
    .footer,
    .nav-actions,
    .btn,
    .sticky-actions,
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        color: #fff;
        border-radius: 12px;
        font-size: 1.4rem;
        transition: all 0.3s ease;
    }

    .menu-toggle:hover {
        background: var(--accent);
        color: #000;
        transform: rotate(90deg);
    }

    .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .preview-slip {
        display: block;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .preview-summary-head {
        border-bottom: 2pt solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }

    .preview-meta,
    .preview-details {
        border: 1px solid #ccc;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    .preview-image-print {
        display: block;
        max-width: 200px;
        margin-bottom: 15px;
    }

    .brand-mark {
        print-color-adjust: exact;
    }

    .preview-doc-id {
        font-size: 16pt;
    }
}

.product-forms-wrap {
    display: grid;
    gap: var(--space-2);
}

.product-form-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.product-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.product-type-manual-input {
    margin-top: 8px;
    width: calc(100% - 12px);
}

.add-product-wide-btn {
    width: auto;
    margin: 18px auto 0 auto;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
}

.file-upload-wrap {
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
    padding: 20px;
    background: rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.file-upload-wrap:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.5);
}

.file-upload-wrap label {
    color: #d4af37;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.file-input {
    width: 100%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s ease;
}

/* Make select controls pill-shaped / round where used */
select,
select.input {
    border-radius: 999px;
    padding: 10px 14px;
}

.file-input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.5);
}

.file-input::file-selector-button {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    padding: 10px 18px;
    margin-right: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.file-input::file-selector-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Image Preview Styles */
.image-preview-container,
.fabric-image-preview-container {
    margin-top: 12px;
    min-height: 0;
}

.image-preview {
    position: relative;
    display: inline-block;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
    margin-top: 8px;
}

.image-preview img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* Tiny inline icon used for fabric preview */
.tiny-image-icon {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    vertical-align: middle;
    margin-right: 8px;
}

.fabric-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.fabric-inline .file-name {
    color: var(--muted);
    font-size: 0.9rem;
}

.fabric-inline-preview-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-left: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fabric-inline-preview-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.15);
}

.detail-value {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.manual-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
}

.manual-field-row input {
    min-width: 120px;
    flex: 1 1 35%;
}

.add-manual-field-confirm-btn,
.remove-manual-field-btn {
    flex: 0 0 auto;
    padding: 10px 14px;
    min-width: 100px;
}

.add-manual-field-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.remove-preview-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-preview-btn:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: scale(1.1);
}

.existing-preview {
    margin-top: 12px;
    display: inline-block;
}

.existing-preview img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid var(--border);
}

/* Gallery slot thumbnails should be small and consistent */
.gallery-slot-preview img,
.gallery-item .summary-image {
    max-width: 160px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

.fabric-upload-section {
    display: none;
}

/* Show fabric upload for products that need it */
.product-form-card[data-product-type="kurta"] .fabric-upload-section,
.product-form-card[data-product-type="sherwani"] .fabric-upload-section,
.product-form-card[data-product-type="waist_coat"] .fabric-upload-section,
.product-form-card[data-product-type="footwear"] .fabric-upload-section,
.product-form-card[data-product-type="shawl"] .fabric-upload-section,
.product-form-card[data-product-type="turban"] .fabric-upload-section {
    display: block;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 700;
}

.badge-new { background: #f6eee0; color: #7d5d18; }
.badge-in_progress { background: #eaf4ff; color: #1d4d8a; }
.badge-ready { background: #eaf8ef; color: #1d7a42; }
.badge-delivered { background: #f4f4f4; color: #4b4b4b; }

.alert {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: var(--space-2);
    border: 1px solid;
    font-weight: 600;
}

.alert-success {
    border-color: #8ecf9e;
    background: #ecf9f0;
    color: #1f6a35;
}

.alert-error {
    border-color: #ecb0b0;
    background: #fff1f1;
    color: #8b2a2a;
}

.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-table th,
.list-table td {
    text-align: left;
    border-bottom: 1px solid rgba(175, 125, 47, 0.15);
    padding: 13px 10px;
    vertical-align: top;
}

.list-table th {
    color: #61471b;
    font-weight: 700;
    font-size: 0.92rem;
}

.summaries-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
}

.summary-image {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(175, 125, 47, 0.2);
    margin-bottom: var(--space-2);
}

.preview-slip {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: var(--space-2);
    padding: 20px;
}

.preview-summary-head {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    align-items: flex-start;
}

.preview-head-meta {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.preview-doc-id {
    color: #6e5732;
    font-weight: 700;
}

.preview-slip-summary,
.preview-slip-product {
    margin-bottom: 14px;
}

.preview-meta,
.preview-details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    background: var(--card);
    backdrop-filter: blur(20px);
}

.meta-row,
.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px dashed rgba(175, 125, 47, 0.25);
    padding: 8px 0;
    font-size: .93rem;
}

.meta-row:last-child,
.detail-row:last-child {
    border-bottom: none;
}

.analytics-bars {
    display: grid;
    gap: 10px;
}

.bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 40px;
    align-items: center;
    gap: 10px;
}

.bar {
    height: 12px;
    border-radius: 999px;
    background: rgba(175, 125, 47, 0.14);
    overflow: hidden;
}

.bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.bar-fill {
    display: block;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(255, 252, 245, 0.75);
    padding-top: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-3);
}

.footer-grid a {
    display: block;
    margin-bottom: var(--space-1);
    color: #5f5138;
}

.footer-bottom {
    padding: 16px 0 20px;
    font-size: .9rem;
    color: #7a6f59;
}

.loader-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(247, 244, 237, 0.9);
    z-index: 60;
    transition: opacity .35s ease, visibility .35s ease;
}

.loader-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-card {
    width: min(350px, 90vw);
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 20px;
    box-shadow: var(--shadow);
}

.loader-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6d4f1a;
    font-weight: 700;
    margin-bottom: 10px;
}

.loader-shimmer {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(175, 125, 47, 0.2), rgba(175, 125, 47, 0.7), rgba(175, 125, 47, 0.2));
    background-size: 230% 100%;
    animation: shimmer 1.2s linear infinite;
    margin-bottom: 14px;
}

@keyframes shimmer {
    from { background-position: 0% 0; }
    to { background-position: 230% 0; }
}

.auth-wrap {
    max-width: 760px;
    margin: 24px auto;
}

.tab-switch {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.tab-btn {
    flex: 1;
}

.tab-pane {
    display: none;
}

.tab-pane.is-active {
    display: block;
}

/* --- Dashboard Action Cards --- */
.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    gap: 12px;
}

.action-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 8px;
    text-shadow: 0 0 20px var(--accent-glow);
}

.action-card h3 {
    margin: 0;
    font-size: 1.5rem;
}

.action-card p {
    font-size: 0.9rem;
    color: var(--muted);
}

.analytics-filter-panel {
    margin-bottom: var(--space-4);
}

.panel-head {
    margin-bottom: 32px;
}

.panel-head h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.panel-head h3 i {
    color: var(--accent);
}

.analytics-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bar-row {
    display: grid;
    grid-template-columns: 160px 1fr 60px;
    align-items: center;
    gap: 20px;
}

.bar-label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.bar {
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #fef08a);
    box-shadow: 0 0 15px var(--accent-glow);
    border-radius: 99px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bar-value {
    font-size: 1.1rem;
    color: #fff;
    text-align: right;
}

.trend-bars .bar-row {
    grid-template-columns: 100px 1fr 60px;
}

/* --- Dark Theme Tables --- */
.list-table {
    width: 100%;
    border-collapse: collapse;
}

.list-table th {
    text-align: left;
    padding: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.list-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.list-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.badge {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-new { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-in_progress { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-ready { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

/* --- Luminous KPI Cards --- */
.kpi {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px !important;
}

.kpi-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.4s ease;
}

.kpi-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi strong {
    font-size: 2.8rem !important;
    line-height: 1;
    margin-top: 6px;
}

/* Color Coding */
.kpi-total .kpi-icon { color: #60a5fa; box-shadow: inset 0 0 15px rgba(96, 165, 250, 0.2); }
.kpi-total { border-color: rgba(96, 165, 250, 0.2); }

.kpi-new .kpi-icon { color: var(--accent); box-shadow: inset 0 0 15px var(--accent-glow); }
.kpi-new { border-color: var(--accent-glow); }

.kpi-progress .kpi-icon { color: #fbbf24; box-shadow: inset 0 0 15px rgba(251, 191, 36, 0.2); }
.kpi-progress { border-color: rgba(251, 191, 36, 0.2); }

.kpi-ready .kpi-icon { color: #34d399; box-shadow: inset 0 0 15px rgba(52, 211, 153, 0.2); }
.kpi-ready { border-color: rgba(52, 211, 153, 0.2); }

.kpi:hover .kpi-icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(255,255,255,0.1);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.page-leaving .page-enter {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .32s ease, transform .32s ease;
}

body.page-leaving::before {
    transform: translateY(0);
}

@media print {
    :root {
        --bg: #fff;
    }

    body {
        background: #fff !important;
    }

    .site-header,
    .site-footer,
    .loader-overlay,
    .section-title .form-actions,
    .image-lightbox-overlay {
        display: none !important;
    }

    .site-main {
        padding: 0;
    }

    .container {
        width: 100%;
        margin: 0;
    }

    .preview-slip,
    .preview-meta,
    .preview-details {
        box-shadow: none !important;
        border-color: #d7d7d7 !important;
        background: #fff !important;
    }

    .preview-summary-head,
    .sticky-actions {
        box-shadow: none !important;
        border-color: #d7d7d7 !important;
        background: #fff !important;
        position: static;
    }

    .preview-slip {
        grid-template-columns: 1fr 1fr;
        padding: 0;
    }

    .meta-row,
    .detail-row {
        font-size: 12px;
    }
}

/* --- Image Lightbox --- */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.image-lightbox-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.image-lightbox-overlay img {
    max-width: calc(100vw - 3rem);
    max-height: calc(100vh - 3rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.image-lightbox-overlay.is-active img {
    transform: scale(1);
}

.lightbox-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 1000;
}

.lightbox-close-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

@media (prefers-reduced-motion: reduce) {
    .image-lightbox-overlay,
    .image-lightbox-overlay img {
        transition: none !important;
    }
}

.site-footer {
    background: #000;
    border-top: 1px solid var(--border);
    padding: var(--space-5) 0 var(--space-3);
    color: var(--muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.footer-brand p {
    margin-top: 24px;
    max-width: 320px;
}

.site-footer h4 {
    color: var(--accent);
    margin-bottom: 24px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.site-footer a {
    display: block;
    color: var(--muted);
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.site-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.site-footer a:hover {
    color: var(--accent);
}

.site-footer a:hover::after {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: var(--space-3);
    font-size: 0.85rem;
}

.menu-toggle {
    display: none;
}

/* --- Mobile & Layout Cleanup --- */
@media (max-width: 980px) {
    .nav-wrap { height: 80px; }
    .menu-toggle {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.2);
        color: #fff;
    }
    .nav-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .user-chip {
        text-align: center;
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    .logout-form .btn {
        width: 100%;
        justify-content: center;
    }
    .hero { grid-template-columns: 1fr; }
}

/* --- Shiny Sweep Animation --- */
@keyframes shiny-sweep {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.1) 45%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 55%, transparent 70%);
    background-size: 200% 100%;
    animation: shiny-sweep 4s infinite linear;
    pointer-events: none;
    z-index: 1;
}

.input, select, textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 14px;
    border-radius: 12px;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    outline: none;
}


/* --- Product Gallery Feature --- */
.gallery-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.gallery-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.gallery-slot {
    aspect-ratio: 1;
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-slot:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.05);
}

.gallery-slot-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.gallery-slot-preview {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.gallery-slot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-gallery-slot-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.gallery-slot:hover .remove-gallery-slot-btn {
    opacity: 1;
    transform: scale(1);
}

.add-gallery-slot-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* --- Preview Gallery --- */
.product-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.gallery-item {
    aspect-ratio: 4/5;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

a.btn.btn-primary {
    color: #666 !important;
}