/* =========================================================
   JAMS APPAREL - COMPLETE UI STYLESHEET
   ========================================================= */

:root {
    --lux-bg: #f8f7f4;
    --lux-bg-strong: #f1eee8;
    --lux-surface: #ffffff;
    --lux-surface-alt: #f3efe9;
    --lux-panel: #f9f7f3;
    --lux-line: #e7e2da;
    --lux-line-strong: #d8d0c5;
    --lux-ink: #1f1d1a;
    --lux-text: #242424;
    --lux-muted: #6d6a67;
    --lux-accent: #b58d66;
    --lux-accent-strong: #9a7853;
    --lux-orange: #e76d39;
    --lux-orange-strong: #bf4f24;
    --lux-success: #1d7a52;
    --lux-warning: #b17b36;
    --lux-error: #a8392a;
    --lux-shadow-soft: 0 18px 48px rgba(36, 33, 30, 0.08);
    --lux-shadow-card: 0 16px 34px rgba(30, 27, 22, 0.08);
    --lux-shadow-lift: 0 22px 50px rgba(31, 29, 26, 0.12);
    --dark: #111827;
    --dark-2: #1f2937;
    --orange: #e76d39;
    --orange-2: #bf4f24;
    --white: #fff;
    --bg: var(--lux-bg);
    --soft: var(--lux-surface-alt);
    --line: var(--lux-line);
    --text: var(--lux-text);
    --muted: var(--lux-muted);
    --green: #1d7a52;
    --yellow: #b17b36;
    --red: #a8392a;
    --blue: #42659b;
    --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
    --font-display: var(--font-sans);

    --shadow: var(--lux-shadow-card);
    --shadow-sm: 0 8px 18px rgba(30, 27, 22, 0.05);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --max: 1440px;
    --workspace-gutter: clamp(18px, 4vw, 80px);
}

/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--lux-bg);
}

body {
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at top left, rgba(181, 141, 102, 0.12), transparent 22%),
        linear-gradient(180deg, #f9f7f3 0%, #f4f1ec 100%);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    overflow-x: hidden;
}

body:not(.center):not(.auth-page):not(.studio-page) {
    background:
        radial-gradient(circle at top left, rgba(181, 141, 102, 0.12), transparent 22%),
        linear-gradient(180deg, #f9f7f3 0%, #f4f1ec 100%);
}

body:not(.center):not(.auth-page):not(.studio-page) main.container,
body:not(.center):not(.auth-page):not(.studio-page) .page-shell,
body:not(.center):not(.auth-page):not(.studio-page) .content-shell,
body:not(.center):not(.auth-page):not(.studio-page) .panel-shell {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--lux-line);
    border-radius: var(--radius-xl);
    box-shadow: var(--lux-shadow-card);
}

body:not(.center) > .navbar {
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--lux-line);
    backdrop-filter: blur(14px);
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
    box-sizing: border-box;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
strong,
label,
a {
    overflow-wrap: anywhere;
}

p {
    color: var(--muted);
}

button,
input,
select,
textarea {
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease, transform 180ms ease;
}

/* =========================================================
   AUTH / LOGIN
   ========================================================= */

body.center {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(
            135deg,
            rgba(17, 24, 39, .92),
            rgba(17, 24, 39, .84)
        ),
        radial-gradient(
            circle at 18% 20%,
            rgba(249, 115, 22, .45),
            transparent 30%
        ),
        #111827;
}

.auth-shell {
    width: min(1060px, 100%);
    display: grid;
    grid-template-columns: minmax(360px, 420px) 1fr;
    background: transparent;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .24);
}

.auth-shell.login-layout {
    max-width: 1080px;
}

body.center.login-page {
    background: url('../LOGIN.png') center center / cover no-repeat fixed;
    padding: 32px;
    min-height: 100vh;
}

.auth-copy {
    display: none;
}

.login-card {
    padding: 54px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, .95);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .2);
}

.auth-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    border-left: 1px solid rgba(0, 0, 0, .05);
}

.image-slot {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-slot img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.brand {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    border: 2px solid var(--dark);
    background: #fff;
    color: var(--dark);
    font-weight: 900;
}

.brand-icon:before {
    content: none;
}

.eyebrow {
    font-size: .82rem;
    font-weight: 900;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #6b7280;
}

.login-card h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    letter-spacing: -.06em;
    line-height: 1.05;
    color: var(--dark);
}

.login-card .subtitle {
    margin-top: 10px;
    color: var(--muted);
    font-size: 1rem;
    max-width: 400px;
}

.login-card input {
    height: 54px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0 18px;
    margin: 16px 0 0;
    background: #fff;
    width: 100%;
}

.login-card input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, .13);
}

.login-card button {
    height: 54px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--orange);
    color: #fff;
    font-weight: 900;
    margin-top: 20px;
}

.login-card button:hover {
    background: var(--orange-2);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 20px;
    font-size: .95rem;
}

.auth-links a {
    color: var(--orange);
    font-weight: 900;
}

#error {
    margin-top: 16px;
    font-size: .95rem;
    color: var(--red) !important;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
    padding: 16px clamp(18px, 6vw, 92px);

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    box-shadow: none;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.navbar a {
    padding: 9px 10px;
    border-bottom: 3px solid transparent;
    color: #374151;
    font-weight: 800;
    font-size: .9rem;
    transition: .15s;
}

.navbar a:hover {
    color: var(--dark);
    border-bottom-color: #cbd5e1;
}

.navbar a.active {
    color: var(--dark);
    border-bottom-color: var(--dark);
}

.navbar a.logout {
    background: var(--dark);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
}

.navbar a.logout:hover {
    background: var(--orange);
    color: #fff;
}

.nav-link-icon {
    display: none;
}

/* =========================================================
   GLOBAL LAYOUT
   ========================================================= */

.container {
    width: 100%;
    max-width: none;
    padding: 0 0 70px;
}

.wide-inner,
.container > h2,
.container > .page-header,
.container > .inventory-header,
.container > .dashboard-top-card,
.container > .search-box,
.container > .product-grid,
.container > .combined-cart-layout,
.container > .orders-grid,
.container > .inventory-grid,
.container > .profile-grid,
.container > .tx-stats-grid,
.container > .tx-table-card,
.container > .card,
.container > .table-tools {
    width: min(var(--max), calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.container > h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    letter-spacing: -.065em;
    margin-top: 44px;
    margin-bottom: 18px;
    color: var(--dark);
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.page-header,
.inventory-header,
.dashboard-top-card,
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 38px;
    margin-bottom: 20px;
}

.page-header h2,
.inventory-header h2,
.dashboard-top-card h2,
.section-header h2 {
    font-size: clamp(1.7rem, 2.8vw, 2.7rem);
    letter-spacing: -.06em;
    line-height: 1.05;
    color: var(--dark);
}

.dashboard-subtitle,
.page-subtitle {
    max-width: 760px;
    color: var(--muted);
}

/* =========================================================
   BUTTONS
   ========================================================= */

button,
.btn,
.primary-btn,
.secondary-btn,
.ghost-btn,
.add-to-cart-btn,
.checkout-btn,
.edit-profile-btn,
.change-password-btn {
    min-height: 44px;
    border-radius: var(--radius-md);
    padding: 0 18px;
    border: 0;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: .16s;
    font-size: .92rem;
    max-width: 100%;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.primary-btn,
.add-to-cart-btn,
.checkout-btn {
    background: var(--orange);
    color: #fff;
}

.primary-btn:hover,
.add-to-cart-btn:hover,
.checkout-btn:hover {
    background: var(--orange-2);
}

.secondary-btn {
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--line);
}

.secondary-btn:hover {
    border-color: var(--dark);
}

.ghost-btn {
    background: transparent;
    color: var(--dark);
    border: 1px solid var(--line);
}

.ghost-btn:hover {
    background: #F8FAFC;
}

.danger-btn {
    background: #FEE2E2 !important;
    color: #B91C1C !important;
}

.danger-btn:hover {
    background: #B91C1C !important;
    color: #fff !important;
}

/* =========================================================
   FORMS
   ========================================================= */

.field-label,
.option-label {
    display: block;
    font-size: .88rem;
    font-weight: 900;
    color: #334155;
    margin: 10px 0 6px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 13px 14px;
    margin: 7px 0 14px;
    background: #fff;
    color: var(--text);
    font-size: .95rem;
    max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, .12);
}

textarea {
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hidden {
    display: none !important;
}

/* =========================================================
   CUSTOMER HOME
   ========================================================= */

.hero-full {
    width: 100%;
    padding: 0;
    margin: 0;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
}

.hero-banner-image {
    width: 100%;
    max-width: none;
    padding: 0;
}

.hero-banner-card {
    position: relative;
    width: 100%;
    min-height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
    background: #111;
}

.hero-image-full {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.process-strip {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 22px clamp(24px, 7vw, 110px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.process-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.process-num {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--orange);
    display: grid;
    place-items: center;
    font-weight: 900;
}

.process-item strong {
    display: block;
    color: var(--dark);
}

.process-item span {
    font-size: .86rem;
    color: var(--muted);
}

.benefits-row {
    padding: 42px clamp(24px, 7vw, 110px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    border-bottom: 1px solid var(--line);
}

.benefit-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    text-align: left;
}

.benefit-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #F1F5F9;
    display: grid;
    place-items: center;
    color: var(--orange);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.benefit-card h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.benefit-card p {
    font-size: .9rem;
}

.catalog-section {
    padding: 48px 0;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 20px;
}

.catalog-header h2 {
    font-size: clamp(2rem, 3.5vw, 4rem);
    letter-spacing: -.08em;
    color: var(--dark);
}

.catalog-header p {
    max-width: 650px;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-bar {
    height: 50px;
    padding: 0 48px 0 16px;
    border-radius: 999px;
    background: #F8FAFC;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: .16s;
    min-width: 0;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #d1d5db;
}

.product-img {
    height: 285px;
    background: #F1F5F9;
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
}

.product-img.empty:before {
    content: "SHIRT";
    font-weight: 900;
    font-size: 2.2rem;
    color: #cbd5e1;
}

.product-info-block {
    padding: 16px;
    min-width: 0;
}

.product-card h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.product-price {
    font-size: 1.08rem;
    color: var(--dark);
    font-weight: 900;
}

.stock-badge {
    display: inline-flex;
    margin-top: 8px;
    font-size: .78rem;
    font-weight: 900;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #047857;
}

.stock-badge.low {
    background: transparent;
    color: #C2410C;
}

.product-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 13px;
}

.product-card-actions button {
    min-height: 40px;
    font-size: .84rem;
}

.custom-design-band {
    background: var(--dark);
    margin: 20px 0 0;
    padding: 44px clamp(24px, 7vw, 110px);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.custom-design-band h2 {
    color: #fff;
    font-size: clamp(1.8rem, 3vw, 3rem);
    letter-spacing: -.06em;
}

.custom-design-band p {
    color: #cbd5e1;
    max-width: 720px;
}

.support-section {
    width: min(var(--max), calc(100% - 48px));
    margin: 50px auto 0;
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 20px;
}

.support-copy {
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 30px;
}

.support-copy h2 {
    color: #fff;
    font-size: 2rem;
    letter-spacing: -.05em;
    margin-bottom: 8px;
}

.support-copy p,
.support-copy div {
    color: #cbd5e1;
}

.support-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.support-form {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: 26px;
    background: #fff;
}

.support-form textarea {
    min-height: 130px;
}

.support-form button {
    width: 100%;
}

/* =========================================================
   PRODUCT MODAL
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .68);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    z-index: 2000;

    overflow-y: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: relative;
    width: min(980px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;

    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 38px;
    height: 38px;
    min-height: 38px;

    padding: 0;
    border-radius: 999px;

    background: #F1F5F9;
    color: #111827;
    z-index: 2;
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
    gap: 24px;
    padding: 34px;
}

.modal-image {
    width: 100%;
    min-height: 390px;
    border-radius: var(--radius-lg);
    background: #F1F5F9;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.modal-info {
    min-width: 0;
    width: 100%;
}

.modal-title {
    font-size: 2rem;
    letter-spacing: -.05em;
    color: var(--dark);
    margin-bottom: 6px;
    line-height: 1.15;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 8px;
}

.modal-description {
    margin-bottom: 14px;
    line-height: 1.6;
}

.product-fabric-note {
    margin: 0 0 14px;
    padding: 8px 10px;
    border-left: 3px solid var(--orange);
    border-radius: 0 4px 4px 0;
    background: #FFF7ED;
    color: #374151;
    font-size: .82rem;
    line-height: 1.45;
}

.option-group {
    width: 100%;
    margin-bottom: 18px;
}

.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 54px;
    background: #fff;
    border: 1px solid var(--line);
    color: #111827;
}

.size-btn.active,
.size-btn:hover {
    background: #111827;
    color: #fff;
}

.size-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.qty-input {
    max-width: 130px;
}

/* =========================================================
   MULTI-SIZE QUANTITY
   ========================================================= */

.size-help-text {
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.modal-size-quantity-list {
    display: grid;
    gap: 8px;
    width: 100%;
}

.modal-size-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    width: 100%;
    min-width: 0;

    padding: 11px 12px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: #F8FAFC;
}

.modal-size-label {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-size-label strong {
    color: var(--dark);
}

.modal-size-label span {
    font-size: .78rem;
    color: var(--muted);
}

.modal-size-qty {
    width: 80px !important;
    min-width: 80px;
    margin: 0 !important;
    text-align: center;
}

.modal-size-row.out-of-stock {
    opacity: .55;
}

.stock-availability {
    margin: 7px 0 0;
    color: #047857;
    font-size: .85rem;
    font-weight: 800;
    line-height: 1.5;
}

/* =========================================================
   UPLOAD
   ========================================================= */

.upload-box {
    width: 100%;
    min-height: 130px;

    border: 1.5px dashed #CBD5E1;
    border-radius: var(--radius-lg);

    background: #F8FAFC;
    padding: 24px;

    text-align: center;
    cursor: pointer;

    overflow: hidden;
}

.upload-box:hover {
    border-color: var(--orange);
    background: #fff7ed;
}

.upload-icon {
    font-size: 1.4rem;
}

.upload-text {
    max-width: 100%;
    line-height: 1.5;
}

.file-input {
    display: none;
}

.image-preview {
    position: relative;
    display: inline-block;
    margin-top: 12px;
    max-width: 100%;
}

.image-preview img {
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
}

.remove-image {
    position: absolute;
    right: -8px;
    top: -8px;

    width: 28px;
    height: 28px;
    min-height: 28px;

    padding: 0;

    background: #B91C1C;
    color: #fff;
    border-radius: 999px;
}

/* =========================================================
   COPYRIGHT / TERMS
   ========================================================= */

.copyright-check,
.terms-check {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);

    align-items: start;

    gap: 10px;

    width: 100%;
    max-width: 100%;

    margin: 14px 0;
    padding: 13px;

    border: 1px solid var(--line);
    background: #F8FAFC;
    border-radius: var(--radius-md);

    color: #475569;
    font-size: .82rem;
    line-height: 1.55;

    overflow: hidden;
}

.copyright-check input,
.terms-check input {
    width: 16px;
    height: 16px;

    min-width: 16px;

    margin: 3px 0 0;

    flex: 0 0 16px;
}

.terms-check a {
    font-weight: 800;
    color: var(--orange);
}

/* =========================================================
   AI MODAL
   ========================================================= */

.ai-modal .modal-content {
    max-width: 900px;
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
}

.ai-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
}

.ai-left {
    padding: 12px 6px;
    min-width: 0;
}

.ai-illustration {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: linear-gradient(180deg, #fff, #f8fafc);

    border-radius: var(--radius-md);

    margin-bottom: 12px;
}

.ai-left h2 {
    margin: 6px 0;
    font-size: 1.4rem;
}

.ai-left .studio-muted {
    color: var(--muted);
    margin-bottom: 12px;
}

.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.ai-suggestions .suggestion {
    background: #fff;
    border: 1px solid var(--line);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: .12s;
}

.ai-suggestions .suggestion:hover {
    transform: translateY(-3px);
    border-color: var(--orange);
}

.ai-right {
    padding: 6px;
    min-width: 0;
}

.ai-right textarea {
    min-height: 120px;
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 1rem;
}

.ai-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.ai-meta .char-counter {
    font-weight: 700;
    color: var(--muted);
}

.ai-meta .prompt-tips {
    font-size: .9rem;
    color: var(--muted);
}

.advanced summary {
    cursor: pointer;
    font-weight: 900;
}

.advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.ai-actions .primary-btn {
    min-width: 170px;
}

.ai-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.loader-spinner {
    width: 56px;
    height: 56px;

    border-radius: 999px;

    border: 6px solid #F1F5F9;
    border-top-color: var(--orange);

    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}

.ai-loader .loader-message {
    font-weight: 800;
    color: var(--dark);
    margin-top: 6px;
}

.ai-result {
    margin-top: 12px;
}

.result-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.placeholder-image {
    width: 260px;
    height: 180px;

    border: 1px dashed var(--line);

    display: grid;
    place-items: center;

    border-radius: var(--radius-md);

    background: #fff;
}

.result-text {
    color: var(--muted);
}

.ai-result .secondary-btn[disabled],
.ai-result .secondary-btn[disabled]:hover {
    opacity: .6;
    cursor: not-allowed;
}

/* =========================================================
   DESIGN STUDIO
   ========================================================= */

.design-shell {
    display: grid;
    grid-template-columns: 220px minmax(420px, 1fr) 580px;
    gap: 24px;

    padding: 30px 40px 60px;

    background: #F8FAFC;

    min-height: 100vh;
}

.design-sidebar-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .08);

    padding: 24px;

    display: flex;
    flex-direction: column;
    gap: 24px;

    min-width: 0;
}

.sidebar-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.icon-button {
    width: 42px;
    height: 42px;

    border-radius: var(--radius-md);

    border: 1px solid var(--line);
    background: #fff;
    color: var(--dark);

    font-size: 1.05rem;

    cursor: pointer;

    display: grid;
    place-items: center;

    transition: .16s;
}

.icon-button:hover {
    background: #F8FAFC;
    transform: translateY(-1px);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 800;
}

.sidebar-items {
    display: grid;
    gap: 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;

    border-radius: 16px;

    border: 1px solid var(--line);

    background: #fff;
    color: var(--dark);

    font-weight: 700;

    cursor: pointer;

    transition: .16s;
}

.sidebar-item.active,
.sidebar-item:hover {
    border-color: var(--orange);
    box-shadow: 0 18px 40px rgba(249, 115, 22, .12);
}

.sidebar-icon {
    width: 34px;
    height: 34px;

    min-width: 34px;

    border-radius: 12px;

    background: #F8FAFC;

    display: grid;
    place-items: center;

    font-size: 1rem;
}

.design-card {
    background: #fff;
    border-radius: 28px;

    box-shadow: 0 28px 90px rgba(15, 23, 42, .08);

    padding: 32px;

    display: flex;
    flex-direction: column;
    gap: 24px;

    position: relative;

    min-width: 0;
}

.design-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.design-card h1 {
    font-size: 2.35rem;
    line-height: 1.02;
    max-width: 520px;
    letter-spacing: -.05em;
    margin-bottom: 10px;
}

.design-card-copy {
    max-width: 560px;
    color: #475569;
    font-size: 1rem;
    line-height: 1.7;
}

.design-card-badge {
    align-self: flex-start;

    background: linear-gradient(
        135deg,
        #f97316,
        #ea580c
    );

    color: #fff;

    padding: 10px 16px;

    border-radius: 999px;

    font-size: .85rem;
    font-weight: 900;

    letter-spacing: .03em;
}

.design-illustration-panel {
    background: linear-gradient(180deg, #fff, #f8fafc);
    border-radius: var(--radius-xl);

    min-height: 320px;

    display: grid;
    place-items: center;

    overflow: hidden;

    position: relative;

    border: 1px solid #e5e7eb;
}

.illustration-hero {
    width: 100%;
    height: 100%;

    background-image:
        linear-gradient(
            135deg,
            rgba(249, 115, 22, .12),
            transparent 40%
        ),
        linear-gradient(
            180deg,
            #f8fafc,
            #fff
        );

    border-radius: var(--radius-xl);
}

.prompt-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.prompt-chip {
    padding: 14px 18px;

    border-radius: 16px;

    border: 1px solid var(--line);

    background: #fff;
    color: var(--dark);

    font-weight: 700;

    cursor: pointer;

    transition: .15s;

    text-align: left;
}

.prompt-chip:hover {
    transform: translateY(-2px);
    border-color: var(--orange);
}

.prompt-panel {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-xl);

    padding: 22px;

    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prompt-textarea {
    min-height: 140px;

    border-radius: 20px;

    padding: 18px;

    font-size: 1rem;
    line-height: 1.6;

    resize: vertical;

    box-shadow: inset 0 6px 18px rgba(15, 23, 42, .04);
}

.prompt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.generate-btn {
    min-width: 170px;
}

.prompt-notice {
    font-size: .93rem;
    color: #6b7280;

    padding: 18px 14px;

    border-radius: 18px;

    background: #fff;

    border: 1px solid #e5e7eb;
}

.ai-result-card {
    background: #fff;
    border: 1px solid #e5e7eb;

    border-radius: var(--radius-xl);

    padding: 22px;

    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ai-result-card.hidden {
    display: none;
}

.ai-result-view {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 0;
}

.ai-result-preview {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.ai-placeholder-image {
    width: 180px;
    height: 140px;

    border-radius: 18px;

    border: 1px dashed #d1d5db;

    display: grid;
    place-items: center;

    background: #fff;
}

.ai-result-copy {
    min-width: 0;
}

.ai-result-copy p {
    margin-bottom: 8px;
    color: #6b7280;
}

.ai-result-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.design-preview-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);

    box-shadow: 0 28px 80px rgba(15, 23, 42, .06);

    padding: 24px;

    display: flex;
    flex-direction: column;
    gap: 18px;

    min-width: 0;
}

.preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.preview-header h2 {
    margin: 0;
}

.preview-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-stage {
    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: var(--radius-xl);

    min-height: 560px;

    display: grid;
    place-items: center;

    position: relative;

    overflow: hidden;
}

.preview-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.preview-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.preview-footer {
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
}

.preview-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
}

.preview-info strong {
    font-size: 1rem;
}

/* =========================================================
   CART
   ========================================================= */

.combined-cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr);
    gap: 24px;
    align-items: start;
}

.cart-items-section,
.cart-summary {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);

    min-width: 0;
}

.cart-summary {
    position: sticky;
    top: 100px;
}

.cart-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 14px;
}

.cart-items-list {
    display: grid;
    gap: 12px;
}

.cart-item-card {
    display: grid;

    grid-template-columns:
        94px
        minmax(0, 1fr)
        auto;

    align-items: start;

    gap: 14px;

    border-bottom: 1px solid var(--line);

    padding: 12px 0;

    min-width: 0;
}

.cart-item-image {
    width: 94px;
    height: 94px;

    border-radius: var(--radius-md);

    background: #F1F5F9;

    background-size: cover;
    background-position: center;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;

    min-width: 0;
}

.cart-item-details h4 {
    color: var(--dark);
}

.cart-item-details p {
    font-size: .88rem;
}

.cart-item-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-actions,
.cart-item-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 6px;
}

.cart-item-total {
    text-align: right;
    min-width: 90px;
}

.cart-item-total strong {
    display: block;
    margin: 4px 0 8px;
}

.edit-btn {
    background: #F1F5F9;
    color: #0F172A;
    border: 1px solid var(--line);
    min-height: 36px;
}

.remove-btn {
    background: #FEE2E2;
    color: #B91C1C;
    min-height: 36px;
}

.cart-item-edit-form {
    display: grid;
    gap: 8px;
}

.cart-item-edit-form .field-label {
    margin: 0;
}

.cart-item-edit-form input,
.cart-item-edit-form select {
    margin: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    border-bottom: 1px solid var(--line);

    padding: 13px 0;

    color: var(--muted);
}

.summary-row > * {
    min-width: 0;
}

.summary-label,
.summary-value {
    color: var(--dark);
    font-size: 1.2rem;
    font-weight: 900;
}

.total-row {
    border-bottom: 0;
}

.checkout-btn {
    width: 100%;
    height: 52px;
    margin-top: 10px;
}

.current-address-display {
    border: 1px dashed #CBD5E1;
    background: #F8FAFC;
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--muted);

    overflow-wrap: anywhere;
}

/* =========================================================
   ORDERS
   ========================================================= */

.orders-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.order-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;

    min-width: 0;
    overflow: hidden;
}

.order-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;

    min-width: 0;
}

.order-card-header > div {
    min-width: 0;
}

.order-card-header h4 {
    color: var(--dark);
    line-height: 1.35;
}

.order-meta {
    font-size: .86rem;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.badge,
.order-status,
.tx-status-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 999px;

    padding: 6px 10px;

    font-size: .74rem;
    font-weight: 900;

    text-transform: uppercase;

    white-space: normal;

    text-align: center;

    line-height: 1.2;

    flex-shrink: 0;
}

.status-pending {
    background: transparent;
    color: #C2410C;
}

.status-pending-payment {
    background: transparent;
    color: #C2410C;
}

.status-processing,
.status-delivering,
.status-in-production {
    background: transparent;
    color: #1D4ED8;
}

.status-completed,
.status-delivered,
.status-paid,
.status-ready {
    background: transparent;
    color: #047857;
}

.status-cancelled,
.status-rejected {
    background: transparent;
    color: #B91C1C;
}

.badge[class*="status-"],
.order-status,
.tx-status-badge {
    padding: 0;
    border-radius: 0;
}

.customer-status {
    padding: 0;
    border-radius: 0;
}

.customer-status.active {
    background: transparent;
    color: #15803D;
}

.customer-status.inactive {
    background: transparent;
    color: #667085;
}

.customer-status.blocked {
    background: transparent;
    color: #B91C1C;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;

    gap: 10px;

    padding: 8px 0;

    color: var(--muted);
}

.order-summary-row span,
.order-summary-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.order-summary-row strong {
    color: var(--dark);
    text-align: right;
}

.order-items {
    min-width: 0;
}

.order-items h5 {
    margin: 12px 0 8px;
}

.order-items ul {
    display: grid;
    gap: 7px;
    list-style: none;
}

.order-items li {
    background: #F8FAFC;

    border: 1px solid var(--line);

    padding: 10px 12px;

    border-radius: var(--radius-md);

    font-size: .9rem;
    color: #475569;

    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 3px;

    overflow-wrap: anywhere;
}

.order-items li strong {
    color: var(--dark);
}

.order-item-size,
.order-item-qty {
    font-size: .84rem;
    color: var(--muted);
}

.order-action {
    border-top: 1px solid var(--line);

    padding-top: 14px;
    margin-top: 14px;

    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.order-action select {
    margin: 0;

    min-width: 160px;
    max-width: 210px;
}

/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dashboard-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    min-width: 0;
}

.dashboard-card-label {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 800;
}

.dashboard-card strong {
    font-size: 2rem;
    color: var(--dark);
    letter-spacing: -.05em;
}

.dashboard-card-icon {
    width: 52px;
    height: 52px;

    min-width: 52px;

    border-radius: 15px;

    background: #FFF7ED;
    color: var(--orange);

    display: grid;
    place-items: center;

    font-size: 1.25rem;
}

/* =========================================================
   INVENTORY
   ========================================================= */

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.inventory-item {
    background: #fff;

    border: 1px solid var(--line);

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    padding: 18px;

    display: grid;

    grid-template-columns:
        90px
        minmax(0, 1fr)
        auto;

    gap: 14px;

    align-items: center;

    min-width: 0;
}

.inventory-thumb {
    width: 90px;
    height: 90px;

    border-radius: var(--radius-md);

    background: #F1F5F9;

    background-size: cover;
    background-position: center;
}

.inventory-item h4 {
    color: var(--dark);
}

.inventory-item p {
    font-size: .9rem;
}

.inventory-item-cta {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-direction: column;
}

.inventory-item-cta span {
    font-weight: 900;
    color: var(--dark);
}

/* =========================================================
   SIZE STOCK FORM
   ========================================================= */

.size-stock-form {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    margin: 8px 0 18px;
}

.size-stock-form > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.size-stock-form label {
    font-size: .8rem;
    font-weight: 900;
    color: #475569;
}

.size-stock-form input {
    margin: 0;
}

.size-stock-line {
    font-size: .82rem !important;
    color: #64748b !important;
    font-weight: 700;
}

/* =========================================================
   TABLES / FILTERS
   ========================================================= */

.table-tools {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;

    margin-top: 8px;
    margin-bottom: 16px;

    min-width: 0;
}

.table-tools .search-box {
    margin: 0;
    flex: 1;
    min-width: 260px;
}

.date-filter-label {
    display: flex;
    align-items: center;

    gap: 7px;

    font-size: .8rem;
    font-weight: 800;

    color: #475569;

    min-width: 0;
}

.date-filter-label input {
    margin: 0;
}

.tx-stats-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;

    margin-top: 0;
    margin-bottom: 18px;
}

.tx-stat-label {
    display: block;
    color: var(--muted);
    font-weight: 800;
    font-size: .86rem;
}

.tx-stat-card strong {
    font-size: 1.7rem;
    color: var(--dark);
}

.tx-table-card {
    overflow-x: auto;
    padding: 10px;
}

.tx-table-header,
.tx-table-row {
    min-width: 880px;

    display: grid;

    grid-template-columns:
        1fr
        1.2fr
        1fr
        1.2fr
        .9fr
        .9fr;

    gap: 14px;

    align-items: center;
}

.tx-table-header {
    padding: 14px;

    border-bottom: 1px solid var(--line);

    font-size: .78rem;
    font-weight: 900;

    text-transform: uppercase;

    color: #475569;
}

.tx-table-row {
    padding: 14px;

    border-bottom: 1px solid #EEF2F7;

    color: #475569;

    font-size: .9rem;
}

.tx-table-row > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tx-table-row:hover {
    background: #F8FAFC;
}

.tx-empty,
.empty-state {
    padding: 40px;

    text-align: center;

    color: var(--muted);

    border: 1px dashed #CBD5E1;

    border-radius: var(--radius-lg);

    background: #fff;
}

/* =========================================================
   PROFILE
   ========================================================= */

.profile-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.profile-grid > * {
    min-width: 0;
}

.profile-card,
.security-card {
    margin: 0;
}

.profile-header,
.security-top {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 12px;

    margin-bottom: 12px;
}

.security-icon {
    width: 48px;
    height: 48px;

    min-width: 48px;

    border-radius: 14px;

    background: #FFF7ED;
    color: var(--orange);

    display: grid;
    place-items: center;
}

.last-login-card {
    background: #F8FAFC;

    border: 1px solid var(--line);

    border-radius: var(--radius-md);

    padding: 14px;

    margin-top: 14px;
}

.login-sessions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.login-sessions-heading h4 {
    margin: 0;
    font-size: 1rem;
}

.login-sessions-heading p,
.login-location-note,
.login-sessions-message {
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
}

.login-sessions-heading p {
    margin: 5px 0 12px;
}

.login-sessions-list {
    display: grid;
    gap: 9px;
}

.login-session-record {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.login-session-record-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.login-session-record-heading strong {
    overflow-wrap: anywhere;
    font-size: .84rem;
}

.login-session-current {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .68rem;
    font-weight: 700;
}

.login-session-record p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.login-session-record .login-session-location {
    color: #475569;
}

.login-session-record a {
    margin-left: 5px;
    color: var(--orange);
    font-weight: 700;
}

.login-session-remove-location {
    margin-top: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b42318;
    font-size: .75rem;
    font-weight: 700;
    cursor: pointer;
}

.login-location-btn {
    margin-top: 12px;
}

.login-location-note {
    margin: 7px 0 0;
}

.login-sessions-message:empty {
    display: none;
}

.addresses-list {
    display: grid;
    gap: 12px;
}

.saved-designs-note {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: .86rem;
}

.saved-design-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: .82rem;
    font-weight: 800;
}

.saved-designs-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.saved-design-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
}

.saved-design-preview {
    display: grid;
    place-items: center;
    height: 190px;
    overflow: hidden;
    background: #f8fafc;
}

.saved-design-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.saved-design-placeholder {
    color: var(--muted);
    font-size: .85rem;
}

.saved-design-details {
    display: grid;
    gap: 5px;
    padding: 12px;
}

.saved-design-details strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-design-meta {
    color: var(--muted);
    font-size: .82rem;
}

.saved-design-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.saved-design-actions button {
    min-height: 34px;
    padding: 0 10px;
    font-size: .78rem;
}

.address-card {
    border: 1px solid var(--line);

    background: #F8FAFC;

    border-radius: var(--radius-md);

    padding: 14px;

    display: flex;

    justify-content: space-between;

    gap: 12px;

    min-width: 0;
}

.small-text {
    font-size: .84rem;
    color: var(--muted);
}

.edit-profile-btn,
.change-password-btn {
    background: var(--dark);
    color: #fff;
}

.edit-profile-btn:hover,
.change-password-btn:hover {
    background: var(--orange);
}

/* =========================================================
   POLICY
   ========================================================= */

.policy-card {
    margin-top: 24px;
    border-radius: var(--radius-lg);
}

.policy-card h3 {
    margin-bottom: 12px;
}

.policy-card p {
    color: #475569;
    margin: 8px 0;
    line-height: 1.6;
}

/* =========================================================
   ORDER CONFIRMATION
   ========================================================= */

.order-confirmation,
.order-confirmation-card,
.confirmation-card {
    width: min(600px, calc(100% - 32px));

    max-width: 100%;

    margin: 30px auto;

    padding: 28px;

    border-radius: var(--radius-xl);

    background: #fff;

    border: 1px solid var(--line);

    box-shadow: 0 12px 35px rgba(15, 23, 42, .08);

    text-align: center;

    overflow: hidden;
}

.order-confirmation *,
.order-confirmation-card *,
.confirmation-card * {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.confirmation-order-id {
    display: block;

    max-width: 100%;

    overflow-wrap: anywhere;
    word-break: break-all;
}

/* =========================================================
   CUSTOM DESIGN MODAL - OLD COMPONENTS
   ========================================================= */

.design-sidebar {
    background: #1f2937;
    color: #fff;

    padding: 20px;

    border-right: 1px solid #374151;

    overflow-y: auto;

    max-height: 90vh;
}

.design-sidebar h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.design-tool-item {
    background: #374151;

    border-radius: var(--radius-md);

    padding: 14px;

    margin-bottom: 10px;

    cursor: pointer;

    text-align: center;

    transition: .15s;
}

.design-tool-item:hover {
    background: #4b5563;
}

.design-tool-item span {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 6px;
}

.design-tool-item p {
    font-size: .85rem;
    color: #cbd5e1;
}

.design-center {
    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding: 40px;

    min-height: 90vh;

    overflow-y: auto;
}

.design-center h2 {
    color: var(--dark);
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.design-options-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;

    width: 100%;
    max-width: 400px;
}

.design-option-card {
    background: #f8fafc;

    border: 2px solid #e5e7eb;

    border-radius: var(--radius-md);

    padding: 30px;

    text-align: center;

    cursor: pointer;

    transition: .2s;
}

.design-option-card:hover {
    border-color: var(--orange);
    background: #fff7ed;
    transform: translateY(-4px);
}

.design-option-card span {
    font-size: 2.2rem;

    display: block;

    margin-bottom: 10px;
}

.design-option-card p {
    color: var(--dark);

    font-weight: 700;

    font-size: .95rem;
}

.design-preview {
    background: #f8fafc;

    padding: 20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 90vh;

    overflow-y: auto;

    border-left: 1px solid #e5e7eb;
}

.preview-btn {
    background: #fff;

    border: 1px solid var(--line);

    padding: 10px 14px;

    border-radius: var(--radius-sm);

    cursor: pointer;

    font-size: .85rem;

    font-weight: 700;

    transition: .15s;
}

.preview-btn:hover {
    background: var(--dark);
    color: #fff;
}

.preview-shirt {
    width: 280px;
    height: 360px;

    background:
        linear-gradient(
            135deg,
            #f0f0f0,
            #e8e8e8
        );

    border-radius: var(--radius-lg);

    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);

    display: grid;
    place-items: center;

    color: #999;

    font-weight: 700;

    margin-top: 20px;
}

/* =========================================================
   RESPONSIVE - 1100PX
   ========================================================= */

@media (max-width: 1100px) {

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits-row,
    .process-strip,
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-preview {
        opacity: .22;
        right: 0;
    }

    .support-section,
    .combined-cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .orders-grid,
    .inventory-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .saved-designs-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inventory-item {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .inventory-item-cta {
        grid-column: 1 / -1;

        align-items: flex-start;

        flex-direction: row;

        flex-wrap: wrap;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 320px;
    }

    .design-shell {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESPONSIVE - 980PX
   ========================================================= */

@media (max-width: 980px) {

    .auth-shell {
        grid-template-columns: 1fr;

        box-shadow: none;
    }

    .auth-visual {
        order: -1;
        height: 320px;
    }

    .auth-visual img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .login-card {
        padding: 42px;
    }

    .auth-links {
        flex-direction: column;
        align-items: flex-start;
    }

    .ai-modal-body {
        grid-template-columns: 1fr;
    }

    .design-shell {
        padding: 24px 20px;
    }
}

/* =========================================================
   RESPONSIVE - 960PX
   ========================================================= */

@media (max-width: 960px) {

    .prompt-chip-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .design-shell {
        grid-template-columns: 1fr;
    }

    .design-preview-panel {
        width: 100%;
    }
}

/* =========================================================
   RESPONSIVE - 760PX
   ========================================================= */

@media (max-width: 760px) {

    body.center.login-page {
        padding: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-copy {
        display: none;
    }

    .navbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 18px;
    }

    .nav-links {
        width: 100%;
        gap: 2px;
    }

    .navbar a {
        font-size: .78rem;
        padding: 8px;
    }

    .navbar a.logout {
        padding: 8px 12px;
    }

    .wide-inner,
    .container > h2,
    .container > .page-header,
    .container > .inventory-header,
    .container > .dashboard-top-card,
    .container > .search-box,
    .container > .product-grid,
    .container > .combined-cart-layout,
    .container > .orders-grid,
    .container > .inventory-grid,
    .container > .profile-grid,
    .container > .tx-stats-grid,
    .container > .tx-table-card,
    .container > .card,
    .container > .table-tools {
        width: calc(100% - 28px);
    }

    .container > h2 {
        margin-top: 30px;
    }

    .hero-full {
        padding: 54px 18px;
        min-height: 520px;
    }

    .hero-full h1 {
        font-size: 3rem;
    }

    .hero-actions a,
    .hero-actions button {
        width: 100%;
    }

    .process-strip,
    .benefits-row,
    .product-grid,
    .dashboard-grid,
    .tx-stats-grid {
        grid-template-columns: 1fr;
    }

    .process-item {
        align-items: flex-start;
    }

    .custom-design-band {
        grid-template-columns: 1fr;
        padding: 34px 18px;
    }

    .catalog-header,
    .page-header,
    .inventory-header,
    .dashboard-top-card,
    .table-tools {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .support-section {
        width: calc(100% - 28px);
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        max-height: calc(100vh - 20px);
        border-radius: var(--radius-lg);
    }

    .modal-body {
        padding: 20px;
        gap: 18px;
    }

    .modal-image {
        min-height: 250px;
        max-height: 330px;
    }

    .modal-title {
        font-size: 1.6rem;
    }

    .size-options {
        grid-template-columns: repeat(4, 1fr);
    }

    .modal-size-row {
        padding: 10px;
    }

    .modal-size-qty {
        width: 72px !important;
        min-width: 72px;
    }

    .copyright-check,
    .terms-check {
        grid-template-columns: 18px minmax(0, 1fr);
        font-size: .8rem;
    }

    .combined-cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item-card {
        grid-template-columns: 75px minmax(0, 1fr);
    }

    .cart-item-image {
        width: 75px;
        height: 75px;
    }

    .cart-item-total {
        grid-column: 2;
        text-align: left;
    }

    .cart-item-actions,
    .cart-item-edit-actions {
        justify-content: flex-start;
    }

    .order-card-header {
        flex-direction: column;
    }

    .order-status {
        align-self: flex-start;
    }

    .order-summary-row {
        flex-direction: column;
        gap: 3px;
    }

    .order-summary-row strong {
        max-width: 100%;
        text-align: left;
    }

    .order-action {
        flex-direction: column;
    }

    .order-action select,
    .order-action button {
        width: 100%;
        max-width: 100%;
    }

    .inventory-item {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .inventory-thumb {
        width: 70px;
        height: 70px;
    }

    .size-stock-form {
        grid-template-columns: repeat(2, 1fr);
    }

    .date-filter-label {
        width: 100%;
        justify-content: space-between;
    }

    .date-filter-label input {
        width: auto;
    }

    .table-tools {
        flex-wrap: wrap;
    }

    .table-tools .search-box {
        min-width: 100%;
        width: 100%;
    }

    .profile-header,
    .security-top {
        align-items: flex-start;
    }

    .address-card {
        flex-direction: column;
    }

    .order-confirmation,
    .order-confirmation-card,
    .confirmation-card {
        width: calc(100% - 20px);
        padding: 20px 16px;
    }

    .design-shell {
        gap: 18px;
        padding: 18px 14px 40px;
    }

    .design-sidebar-panel,
    .design-card,
    .design-preview-panel {
        border-radius: var(--radius-lg);
    }

    .design-card {
        padding: 22px;
    }

    .design-card-header {
        flex-direction: column;
        gap: 12px;
    }

    .design-card h1 {
        font-size: 2rem;
    }

    .prompt-chip-row {
        grid-template-columns: 1fr;
    }

    .prompt-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .generate-btn {
        width: 100%;
    }

    .preview-stage {
        min-height: 420px;
    }

    .sidebar-items {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESPONSIVE - 520PX
   ========================================================= */

@media (max-width: 520px) {

    .login-card {
        padding: 30px 22px;
    }

    .login-card h1 {
        font-size: 2.2rem;
    }

    .auth-visual {
        height: 220px;
    }

    .hero-full {
        min-height: 420px;
    }

    .product-card-actions {
        grid-template-columns: 1fr;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-image {
        min-height: 210px;
    }

    .modal-size-row {
        align-items: flex-start;
    }

    .modal-size-label {
        flex: 1;
    }

    .copyright-check,
    .terms-check {
        font-size: .76rem;
        line-height: 1.5;
        padding: 11px;
    }

    .cart-items-section,
    .cart-summary,
    .order-card,
    .card {
        padding: 16px;
    }

    .cart-item-card {
        grid-template-columns: 1fr;
    }

    .cart-item-image {
        width: 100%;
        height: 180px;
    }

    .cart-item-total {
        grid-column: auto;
    }

    .size-stock-form {
        grid-template-columns: 1fr 1fr;
    }

    .summary-row {
        align-items: flex-start;
    }

    .summary-label,
    .summary-value {
        font-size: 1.05rem;
    }

    .dashboard-card strong {
        font-size: 1.6rem;
    }

    .design-options-grid {
        grid-template-columns: 1fr;
    }

    .preview-shirt {
        width: 220px;
        height: 290px;
    }
}

/* =========================================================
   JAMS APPAREL - UI POLISH OVERRIDES
   Keeps all existing images and functionality intact.
   ========================================================= */

:root {
    --ui-gap: 24px;
    --ui-border: #e6e9ee;
    --ui-radius: 16px;
}

body:not(.center) {
    background: #f7f8fa;
}

.navbar {
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 56px);
    gap: 22px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--ui-border);
    box-shadow: 0 4px 18px rgba(17,24,39,.05);
    backdrop-filter: blur(12px);
}

.brand-row { gap: 11px; min-width: max-content; }
.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}
.brand-name { font-size: 1.08rem; font-weight: 900; }

.nav-links {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav-links a,
.nav-links button {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 700;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-links a:hover,
.nav-links button:hover { background: #f1f3f6; transform: translateY(-1px); }
.nav-links a.active { background: #fff0e8; color: var(--orange-2); }

.container,
.wide-inner {
    width: min(1380px, calc(100% - 36px));
    margin-inline: auto;
}
.container { padding-block: 34px 56px; }
.wide-inner { padding-block: 28px 52px; }

.page-header,
.catalog-header,
.inventory-header,
.profile-header {
    margin-bottom: 22px;
}
.page-header h1,
.catalog-header h1,
.inventory-header h1,
.profile-header h1 {
    letter-spacing: -.035em;
    line-height: 1.12;
}

.card,
.dashboard-top-card,
.dashboard-card,
.inventory-header,
.policy-card,
.cart-items-section,
.cart-summary,
.design-card,
.order-card,
.tx-stat-card,
.tx-table-card {
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius);
    box-shadow: 0 8px 26px rgba(17,24,39,.055);
    background: #fff;
}

.card { padding: 22px; }

button,
.primary-btn,
.secondary-btn,
.checkout-btn,
.add-to-cart-btn {
    min-height: 42px;
    border-radius: 10px;
    font-weight: 800;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.checkout-btn:hover,
.add-to-cart-btn:hover {
    transform: translateY(-1px);
}
button:active,
.primary-btn:active,
.secondary-btn:active,
.checkout-btn:active,
.add-to-cart-btn:active { transform: translateY(0); }

input,
select,
textarea {
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus,
select:focus,
textarea:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}

/* Product catalog */
.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.product-card {
    overflow: hidden;
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(17,24,39,.055);
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(17,24,39,.10);
}
.product-img,
.product-card img {
    width: 100%;
    object-fit: contain;
    background: #f8f8f8;
}
.product-card-body { padding: 16px; }
.product-card h3 { line-height: 1.25; margin-bottom: 5px; }
.product-card-actions { gap: 8px; }

/* Forms */
.form-grid { gap: 16px; }
.option-group,
.field-group { min-width: 0; }
.option-label,
.field-label {
    display: block;
    margin-bottom: 7px;
    font-size: .84rem;
    font-weight: 800;
    color: #374151;
}

/* Terms / checkbox rows -- prevents long text from becoming messy */
.terms-check,
.copyright-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    background: #fafafa;
    line-height: 1.45;
    font-size: .86rem;
}
.terms-check input,
.copyright-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}
.terms-check label,
.copyright-check label { flex: 1; min-width: 0; }

/* Cart / checkout */
.combined-cart-layout {
    align-items: start;
    gap: 24px;
}
.cart-items-list { gap: 12px; }
.cart-item-card {
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
}
.cart-item-image {
    border-radius: 10px;
    background: #f7f7f7;
}
.cart-summary {
    position: sticky;
    top: 94px;
}
.summary-row { gap: 18px; }
.summary-label { color: #64748b; }
.summary-value { color: #111827; font-weight: 800; text-align: right; }
.total-row {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--ui-border);
}
.checkout-btn { width: 100%; margin-top: 16px; }

/* Orders */
.orders-grid { gap: 18px; }
.order-card { overflow: hidden; }
.order-card h3 { line-height: 1.3; }

/* Tables / admin pages */
.table-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.search-box,
.search-bar { min-width: 0; }
.table-responsive,
.inventory-table-wrapper,
.tx-table-wrapper,
.orders-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--ui-border);
    border-radius: 12px;
}
table { min-width: 680px; }
th {
    white-space: nowrap;
    font-size: .78rem;
    letter-spacing: .02em;
    text-transform: uppercase;
}
td, th { padding: 12px 14px; }

/* Design studio */
.design-shell {
    gap: 20px;
    align-items: start;
}
.design-sidebar-panel,
.design-preview-panel {
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(17,24,39,.055);
}
.design-card { box-shadow: none; }
.preview-canvas {
    border-radius: 14px;
    overflow: hidden;
}

/* Login keeps the supplied artwork */
body.center.login-page { padding: 20px; }
.auth-shell.login-layout { gap: 0; }
.login-card { border-radius: 20px 0 0 20px; }
.auth-visual { border-radius: 0 20px 20px 0; overflow: hidden; }
.image-slot img { max-height: 620px; }

/* Prevent accidental horizontal overflow from long order/design names */
.order-items,
.order-items li,
.cart-items-list,
.modal-body,
.modal-info,
.ai-result-copy,
.profile-card,
.security-card { min-width: 0; }

@media (max-width: 900px) {
    .navbar { align-items: center; }
    .nav-links { justify-content: flex-start; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
    .nav-links a { white-space: nowrap; }
    .container, .wide-inner { width: min(100% - 24px, 1380px); }
    .cart-summary { position: static; }
    .auth-shell.login-layout { grid-template-columns: 1fr; max-width: 620px; }
    .login-card { border-radius: 20px; }
    .auth-visual { display: none; }
}

@media (max-width: 600px) {
    .navbar { position: relative; padding: 12px; }
    .container { padding-block: 22px 40px; }
    .card,
    .dashboard-top-card,
    .dashboard-card,
    .inventory-header,
    .policy-card,
    .cart-items-section,
    .cart-summary,
    .design-card,
    .order-card,
    .tx-stat-card,
    .tx-table-card { border-radius: 13px; padding: 16px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .product-card-body { padding: 12px; }
    .product-card-actions { grid-template-columns: 1fr; }
    .table-tools { align-items: stretch; }
    .table-tools > * { width: 100%; }
    .login-card { padding: 32px 22px; }
}


/* Final cart terms alignment fix */
.cart-summary .terms-check {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 14px 0;
    padding: 12px 14px;
    line-height: 1.5;
    text-align: left;
}

.cart-summary .terms-check input {
    grid-column: 1;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.cart-summary .terms-check .terms-check-text {
    grid-column: 2;
    min-width: 0;
    display: block;
    overflow-wrap: anywhere;
}

.cart-summary .terms-check a {
    display: inline;
    overflow-wrap: anywhere;
    word-break: normal;
}

@media (max-width: 600px) {
    .cart-summary .terms-check {
        grid-template-columns: 18px minmax(0, 1fr);
        column-gap: 9px;
        padding: 11px 12px;
        font-size: .78rem;
    }
}

/* =========================================================
   FINAL UX POLISH - PASSWORDS / CART / SYSTEM GUIDE
   ========================================================= */
.password-field { position:relative; width:100%; }
.password-field input { width:100%; padding-right:72px; }
.password-toggle { position:absolute; right:7px; top:50%; transform:translateY(-50%); min-height:32px; padding:5px 9px; border:0; border-radius:8px; background:#f1f5f9; color:#475569; font-size:.72rem; font-weight:900; }
.password-toggle:hover { background:#e2e8f0; transform:translateY(-50%); }
.cart-shirt-preview { background-size:contain !important; background-position:center !important; background-repeat:no-repeat !important; min-height:150px; }
.cart-color-dot { display:inline-block; width:11px; height:11px; border-radius:50%; border:1px solid #cbd5e1; vertical-align:-1px; margin-right:5px; }

.system-help-button { position:fixed; right:20px; bottom:20px; z-index:4500; border:1px solid #e5e7eb; background:#111827; color:#fff; border-radius:999px; padding:11px 15px; font-weight:900; font-size:.78rem; box-shadow:0 14px 35px rgba(15,23,42,.22); }
.system-help-button:hover { transform:translateY(-2px); }
.system-help-modal { position:fixed; inset:0; z-index:5500; display:grid; place-items:center; padding:20px; background:rgba(15,23,42,.58); }
.system-help-modal.hidden { display:none; }
.system-help-card { width:min(780px,100%); max-height:90vh; overflow:auto; background:#fff; border-radius:22px; padding:24px; box-shadow:0 30px 100px rgba(0,0,0,.25); }
.system-help-head { display:flex; justify-content:space-between; gap:15px; align-items:flex-start; margin-bottom:18px; }
.system-help-head h2 { margin:3px 0 4px; }
.system-help-head p { margin:0; }
.system-help-close { width:38px; height:38px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; font-size:1.25rem; }
.system-help-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.system-help-grid > div { padding:14px; border:1px solid #e5e7eb; border-radius:14px; background:#f8fafc; }
.system-help-grid b { display:block; margin-bottom:4px; font-size:.85rem; }
.system-help-grid p { margin:0; font-size:.78rem; line-height:1.55; }
@media(max-width:600px){ .system-help-button{right:12px;bottom:12px;padding:10px 12px}.system-help-card{padding:18px}.system-help-grid{grid-template-columns:1fr}.cart-shirt-preview{min-height:130px} }

body.login-page .chat-app,
body.login-page .lc-floating-btn,
body.login-page .lc-panel,
body.login-page .lc-admin-btn,
body.admin-page .chat-app,
body.admin-page .lc-floating-btn,
body.admin-page .lc-panel,
body.admin-page .lc-admin-btn {
    display: none !important;
}
