/* Brand tokens */
:root {
    color-scheme: light;
    --bg: #f6f3ee;
    --surface: #fffdfa;
    --surface-alt: #eee8de;
    --text: #292620;
    --muted: #746b60;
    --line: #dfd7cb;
    --accent: #b95121;
    --accent-hover: #97411b;
    --on-accent: #fffaf4;
    --wood: #a37b51;
    --wood-light: #d6b48a;
    --hero: #eae1d4;
    --success: #397058;
    --warning: #a45b1a;
    --danger: #a64336;
    --focus: #d47c43;
    --shadow: 0 8px 24px #392a1710;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #191815;
    --surface: #24221e;
    --surface-alt: #302c26;
    --text: #f1ece3;
    --muted: #b7ad9f;
    --line: #453e34;
    --accent: #ec9756;
    --accent-hover: #f2af78;
    --on-accent: #25190e;
    --wood: #b48a5e;
    --wood-light: #a7835c;
    --hero: #332b22;
    --success: #85bf9e;
    --warning: #e6af6c;
    --danger: #e99181;
    --focus: #ec9756;
    --shadow: 0 8px 24px #00000018;
}

/* Base layout */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font:
        15px/1.5 "Segoe UI",
        Arial,
        sans-serif;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 94px;
}
h1,
h2,
h3,
p {
    margin: 0;
}
h1,
h2,
h3 {
    line-height: 1.15;
}
h1 {
    font-weight: 650;
    letter-spacing: -1.6px;
}
h2 {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -0.6px;
}
h3 {
    font-size: 16px;
    font-weight: 600;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
select {
    font: inherit;
}
button,
a,
input,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: wait;
    opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}
[hidden] {
    display: none !important;
}
.shell {
    width: min(1320px, calc(100% - 64px));
    margin-inline: auto;
}
.muted {
    color: var(--muted);
}
.small {
    font-size: 13px;
}
.eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
.icon {
    display: inline-block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 43px;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 10px 18px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    font-size: 14px;
    transition: background 0.15s;
}
.button:hover {
    background: var(--accent-hover);
}
.button-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}
.button-secondary:hover {
    background: var(--surface-alt);
}
.button-small {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
}
.button-full {
    width: 100%;
}
.icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    background: transparent;
}
.icon-button:hover {
    background: var(--surface-alt);
}
.text-button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}
input,
select {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 9px 11px;
    background: var(--surface);
    color: var(--text);
    min-width: 0;
}
input::placeholder {
    color: var(--muted);
}
label {
    font-size: 13px;
    font-weight: 600;
}
.notice {
    color: var(--danger);
    border-left: 3px solid currentColor;
    padding: 10px 14px;
    margin: 18px 0;
    background: var(--surface);
}
.notice:empty {
    display: none;
}
.notice[data-tone="success"] {
    color: var(--success);
}
.empty-state {
    padding: 42px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}
.count-badge {
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--surface-alt);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

/* Header controls */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 35px;
    min-height: 80px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex: none;
}
.brand > span {
    font-size: 25px;
    font-weight: 750;
    letter-spacing: 1.2px;
}
.brand img {
    object-fit: contain;
}
.brand-period {
    color: var(--accent);
}
.store-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: 20px;
    font-size: 13px;
    font-weight: 600;
}
.store-nav a:hover,
.back-link:hover {
    color: var(--accent);
}
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
}
.preferences {
    display: flex;
    align-items: center;
    gap: 7px;
}
.preferences select {
    min-height: 36px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 650;
    background: transparent;
}
.account {
    display: flex;
    gap: 12px;
    align-items: center;
}
.account-copy {
    display: grid;
    font-size: 12px;
}
.account-copy small {
    color: var(--muted);
    font-size: 11px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

/* Store introduction */
.store-main {
    padding-top: 28px;
}
.store-hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 390px;
    background: var(--hero);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 54px;
}
.hero-copy {
    padding: 48px 40px 46px 48px;
    align-self: center;
}
.hero-copy h1 {
    font-size: clamp(37px, 3.6vw, 54px);
    line-height: 1.07;
    margin: 17px 0 20px;
    white-space: pre-line;
}
.hero-description {
    max-width: 410px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}
.room {
    position: relative;
    min-height: 390px;
    background: linear-gradient(120deg, var(--surface-alt), var(--hero));
    overflow: hidden;
}
.room-window {
    position: absolute;
    width: 190px;
    height: 244px;
    top: 25px;
    right: 62px;
    border: 8px solid #a98d6c;
    background: linear-gradient(105deg, #efe9d7, #c9d0c0);
    box-shadow: inset 0 0 0 2px #ffffff50;
}
.room-window::before,
.room-window::after {
    content: "";
    position: absolute;
    background: #a98d6c;
}
.room-window::before {
    width: 7px;
    height: 100%;
    left: 50%;
}
.room-window::after {
    height: 7px;
    width: 100%;
    top: 50%;
}
.room-panel {
    position: absolute;
    width: 130px;
    height: 320px;
    left: 30px;
    top: 0;
    background: repeating-linear-gradient(90deg, #b58c60 0 10px, #936a43 10px 12px);
}
.room-floor {
    position: absolute;
    height: 102px;
    width: 100%;
    bottom: 0;
    background: repeating-linear-gradient(170deg, #c6a37b 0 28px, #b68e63 28px 30px);
    transform: skewY(-5deg);
    transform-origin: left bottom;
}
.room-shelf {
    position: absolute;
    right: 31px;
    top: 224px;
    width: 215px;
    height: 11px;
    background: #94704b;
    z-index: 1;
}
.room-shelf::before {
    content: "";
    position: absolute;
    right: 26px;
    bottom: 11px;
    width: 35px;
    height: 53px;
    background: #aa6344;
    border-radius: 4px 4px 12px 12px;
}
.room-sofa {
    position: absolute;
    z-index: 3;
    width: 280px;
    height: 83px;
    left: 65px;
    bottom: 81px;
    background: #887b64;
    border-radius: 9px 9px 4px 4px;
    box-shadow: 4px 12px 20px #38281f25;
}
.room-sofa::before {
    content: "";
    position: absolute;
    width: 254px;
    height: 90px;
    bottom: 45px;
    left: 13px;
    background: #a39379;
    border-radius: 13px 13px 2px 2px;
}
.room-sofa::after {
    content: "";
    position: absolute;
    left: -15px;
    top: -3px;
    width: 29px;
    height: 72px;
    background: #8e7f66;
    border-radius: 6px;
    box-shadow: 282px 0 #8e7f66;
}
.room-sofa i {
    position: absolute;
    z-index: 1;
    width: 66px;
    height: 62px;
    left: 35px;
    bottom: 67px;
    background: #c88151;
    border-radius: 4px;
    transform: rotate(-9deg);
    box-shadow: 132px 9px #cbbda4;
}
.room-table {
    position: absolute;
    z-index: 5;
    bottom: 49px;
    left: 242px;
    width: 160px;
    height: 13px;
    background: #a57043;
    border-radius: 50%;
}
.room-table::after {
    content: "";
    position: absolute;
    width: 24px;
    height: 56px;
    top: 7px;
    left: 67px;
    background: #93603a;
}
.room-lamp {
    position: absolute;
    z-index: 4;
    bottom: 89px;
    right: 24px;
    width: 5px;
    height: 183px;
    background: #5e5344;
}
.room-lamp::before {
    content: "";
    position: absolute;
    width: 74px;
    height: 56px;
    top: -12px;
    left: -35px;
    background: #d9ccb4;
    clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%);
}
.room-caption {
    position: absolute;
    z-index: 7;
    bottom: 17px;
    left: 25px;
    font-size: 10px;
    letter-spacing: 1px;
    color: #433528;
    text-transform: uppercase;
}

/* Collection layout */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 22px;
}
.section-heading .eyebrow {
    margin-bottom: 8px;
}
.section-heading h2 {
    font-size: 30px;
    margin-bottom: 7px;
}
.section-heading .muted {
    font-size: 14px;
}
.product-count {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}
.collection-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}
.search-field {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
    min-height: 42px;
}
.search-field .icon {
    color: var(--muted);
}
.search-field input {
    border: 0;
    padding-inline: 0;
    background: transparent;
    width: 100%;
}
.collection-toolbar > .search-field {
    flex: 0 1 270px;
}
.category-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.category-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 10px 11px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}
.category-tabs button.selected {
    border-color: var(--accent);
    color: var(--text);
}
.store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 25px;
    align-items: start;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}
.product-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-image {
    height: 178px;
    background: var(--surface-alt);
    display: grid;
    place-items: center;
    position: relative;
}
.product-image img {
    width: 84%;
    height: 86%;
    object-fit: contain;
    transition: transform 0.2s;
}
.product-card:hover .product-image img {
    transform: translateY(-3px);
}
.product-id {
    position: absolute;
    right: 10px;
    top: 9px;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
}
.product-copy {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 10px;
    color: var(--accent);
    margin-bottom: 6px;
}
.product-copy h3 {
    font-size: 14px;
    line-height: 1.4;
    min-height: 40px;
    font-weight: 600;
}
.product-price {
    margin: 14px 0 13px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.4px;
}
.product-price small {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 3px;
}
.quantity-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}
.quantity-row > span {
    font-size: 11px;
    color: var(--muted);
}
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
}
.quantity-control button {
    border: 0;
    background: transparent;
    color: var(--text);
    width: 27px;
    height: 31px;
    font-size: 18px;
}
.quantity-control button:hover {
    background: var(--surface-alt);
}
.quantity-control input {
    appearance: textfield;
    min-height: 31px;
    height: 31px;
    width: 39px;
    padding: 0;
    text-align: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 12px;
}
.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* Checkout panel */
.cart-panel {
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    padding: 20px;
    position: sticky;
    top: 104px;
}
.cart-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 15px;
}
.cart-heading h2 {
    font-size: 16px;
    letter-spacing: -0.3px;
}
.cart-heading .count-badge {
    margin-left: auto;
}
.cart-items {
    max-height: 310px;
    overflow: auto;
}
.cart-empty {
    padding: 22px 0 27px;
}
.cart-empty strong {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}
.cart-empty p {
    font-size: 12px;
    color: var(--muted);
}
.cart-line {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cart-line-name {
    display: flex;
    justify-content: space-between;
    gap: 9px;
    font-size: 12px;
    font-weight: 600;
}
.cart-line p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}
.cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
}
.cart-total strong {
    font-size: 23px;
    letter-spacing: -0.6px;
}
.cart-panel #selected-count {
    margin-top: 2px;
    margin-bottom: 20px;
}
.cart-panel label {
    display: block;
    margin-bottom: 6px;
}
.cart-panel input,
.cart-panel select {
    width: 100%;
    margin-bottom: 16px;
}
.cart-panel #checkout-hint {
    margin-top: 11px;
    line-height: 1.5;
    font-size: 11px;
}
.customer-history {
    margin-top: 55px;
}
.order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.order-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 20px;
}
.order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.order-lines {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 13px;
    display: grid;
    gap: 10px;
}
.order-line {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
}
.order-line strong {
    white-space: nowrap;
    font-weight: 600;
}
.order-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    margin-top: 15px;
    padding-top: 13px;
    font-size: 14px;
}
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}
.status-badge[data-status="New"],
.status-badge[data-status="risk"] {
    color: var(--warning);
    background: color-mix(in srgb, var(--warning) 12%, var(--surface));
}
.status-badge[data-status="Confirmed"] {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 11%, var(--surface));
}
.status-badge[data-status="Completed"],
.status-badge[data-status="covered"] {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 11%, var(--surface));
}
.status-badge[data-status="Cancelled"] {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}
.site-footer {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 25px 0;
    margin-top: 65px;
    color: var(--muted);
    font-size: 12px;
}
.site-footer .brand {
    color: var(--text);
    margin-right: auto;
}
.site-footer .brand img {
    width: 24px;
    height: 27px;
}
.site-footer .brand > span {
    font-size: 18px;
}

/* Sign-in layout */
.login-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: calc(100vh - 81px);
    gap: 80px;
    max-width: 1100px;
}
.login-identity {
    background: var(--hero);
    min-height: 560px;
    padding: 30px;
    align-self: stretch;
    margin: 45px 0;
    border-radius: 7px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.login-identity > p:last-child {
    font-size: 12px;
    color: var(--muted);
}
.door-illustration {
    position: absolute;
    inset: 100px 70px 100px;
}
.door-frame {
    position: relative;
    width: 190px;
    height: 300px;
    margin: 0 auto;
    border: 13px solid #a47c51;
    border-bottom: 0;
    background: #5c4c39;
    box-shadow: -12px 0 0 #c5a276;
}
.door-panel {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, #bd986d 0 31px, #b18c61 31px 33px);
    transform: perspective(600px) rotateY(-28deg);
    transform-origin: left;
    box-shadow: inset 0 0 0 3px #6c503b40;
}
.door-panel::after {
    content: "";
    width: 21px;
    height: 5px;
    background: #423a31;
    position: absolute;
    right: 12px;
    top: 54%;
    border-radius: 2px;
}
.door-shadow {
    position: absolute;
    width: 225px;
    height: 17px;
    background: #2f21151f;
    top: 296px;
    left: calc(50% - 120px);
    transform: skewX(-30deg);
}
.login-form-panel {
    max-width: 390px;
    padding: 40px 0;
    width: 100%;
}
.login-mark {
    margin-bottom: 22px;
}
.login-intro h1 {
    font-size: 32px;
    margin-bottom: 10px;
}
.login-intro {
    margin-bottom: 25px;
}
.login-form-panel form {
    display: grid;
    gap: 9px;
}
.login-form-panel form > label {
    margin-top: 9px;
}
.login-form-panel form > .button {
    margin-top: 15px;
}
.password-field {
    position: relative;
}
.password-field input {
    width: 100%;
    padding-right: 75px;
}
.password-field button {
    position: absolute;
    right: 10px;
    top: 10px;
}
.demo-accounts {
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding-top: 17px;
}
.demo-accounts summary {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}
.demo-accounts p {
    margin-top: 13px;
}
.demo-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}
.demo-buttons .button {
    font-size: 11px;
    padding: 7px 9px;
    min-height: 33px;
}

/* Staff workspace */
.workspace-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.workspace-header .brand > span {
    font-size: 21px;
}
.workspace-header .brand img {
    width: 28px;
    height: 31px;
}
.workspace-divider {
    height: 22px;
    width: 1px;
    background: var(--line);
}
.workspace-label {
    font-size: 12px;
    color: var(--muted);
}
.workspace-shell {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: calc(100vh - 69px);
}
.workspace-sidebar {
    min-width: 0;
    border-right: 1px solid var(--line);
    background: var(--surface);
    padding: 26px 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 69px;
    height: calc(100vh - 69px);
}
.workspace-sidebar nav {
    display: grid;
    gap: 5px;
}
.workspace-sidebar nav button {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    text-align: left;
    color: var(--muted);
    font-size: 13px;
    font-weight: 550;
}
.workspace-sidebar nav button.selected {
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    color: var(--accent);
}
.workspace-sidebar nav button .count-badge {
    margin-left: auto;
    font-size: 10px;
    min-width: 20px;
}
.sidebar-store {
    margin-top: auto;
    padding: 10px;
    display: flex;
    gap: 9px;
    color: var(--muted);
    font-size: 12px;
    align-items: center;
}
.workspace-content {
    padding: 30px clamp(20px, 3vw, 45px) 45px;
    min-width: 0;
    max-width: 1600px;
    width: 100%;
}
.workspace-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.workspace-title .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
    margin-bottom: 7px;
}
.workspace-title h1 {
    font-size: 28px;
    letter-spacing: -0.8px;
}
.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}
.analytics-toolbar > p {
    font-size: 13px;
}
.period-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}
.period-picker > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
}
.period-picker select {
    font-size: 12px;
    min-height: 36px;
    padding: 6px 10px;
}
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.kpi {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 6px;
    padding: 19px;
    min-width: 0;
}
.kpi p {
    font-size: 12px;
    color: var(--muted);
}
.kpi > strong {
    display: block;
    font-size: clamp(23px, 2.2vw, 32px);
    font-weight: 600;
    letter-spacing: -1px;
    margin: 10px 0 7px;
    font-variant-numeric: tabular-nums;
}
.kpi > small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.45;
}
.analytics-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 20px;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    min-width: 0;
    overflow: hidden;
}
.panel-heading {
    padding: 20px 22px 12px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}
.panel-heading h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.25px;
}
.panel-heading p {
    margin-top: 5px;
    font-size: 11px;
}
.unit-label {
    color: var(--muted);
    font-size: 11px;
}
.chart {
    min-height: 245px;
    padding: 10px 12px 8px;
}
.chart svg {
    display: block;
    width: 100%;
    overflow: visible;
}
.chart text {
    fill: var(--muted);
    font-family: inherit;
    font-size: 11px;
}
.chart .grid-line {
    stroke: var(--line);
    stroke-width: 1;
}
.chart .chart-bar {
    fill: var(--accent);
}
.chart .chart-bar:hover {
    fill: var(--accent-hover);
}
.chart .empty-state {
    min-height: 205px;
    display: grid;
    place-items: center;
}
.status-chart {
    padding: 17px 22px 23px;
    display: grid;
    gap: 19px;
}
.status-row-head {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 7px;
}
.status-track {
    height: 5px;
    border-radius: 2px;
    background: var(--surface-alt);
    overflow: hidden;
}
.status-fill {
    height: 100%;
    background: var(--accent);
}
.status-fill[data-status="Completed"] {
    background: var(--success);
}
.status-fill[data-status="Cancelled"] {
    background: var(--muted);
}
.status-fill[data-status="New"] {
    background: var(--warning);
}
.top-products-panel {
    grid-column: 1 / -1;
}
.rank-list {
    padding: 4px 22px 12px;
}
.rank-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    align-items: center;
    font-size: 13px;
}
.rank-row:last-child {
    border: 0;
}
.rank-row > span:first-child {
    color: var(--muted);
    font-size: 11px;
}
.rank-row strong {
    font-weight: 600;
}
.rank-row small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

/* Operations tables */
.view-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    margin-bottom: 18px;
}
.view-toolbar .search-field {
    flex: 1;
    max-width: 470px;
}
.view-toolbar > p {
    font-size: 13px;
}
.view-toolbar > select {
    min-width: 150px;
    font-size: 12px;
}
.table-scroll {
    overflow-x: auto;
    width: 100%;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 12px;
}
th {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
    background: var(--surface-alt);
    white-space: nowrap;
}
td,
th {
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
}
tbody tr:last-child td {
    border-bottom: 0;
}
tbody tr:hover {
    background: color-mix(in srgb, var(--surface-alt) 50%, var(--surface));
}
td .text-button {
    white-space: nowrap;
}
td strong {
    font-weight: 600;
}
.numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.cell-subtitle {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px;
}
.forecast-notice {
    padding: 11px 14px;
    border-left: 3px solid var(--accent);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 20px;
}
.forecast-notice[data-tone="warning"] {
    border-color: var(--warning);
    color: var(--warning);
}
.forecast-panel {
    margin-bottom: 20px;
}
.product-picker select {
    width: 260px;
    max-width: 100%;
    font-size: 12px;
}
.model-details {
    border-top: 1px solid var(--line);
    padding: 13px 22px;
}
.model-details summary {
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}
.model-details p {
    margin-top: 12px;
}
.model-details dl {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 4px;
}
.model-details dt {
    font-size: 11px;
    color: var(--muted);
}
.model-details dd {
    margin: 5px 0 0;
    font-size: 16px;
}
.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 400;
}
.checkbox-field input {
    min-height: 0;
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}
.user-panel {
    max-width: 560px;
}
.user-panel form {
    padding: 10px 22px 24px;
    display: grid;
    gap: 9px;
}
.user-panel form label:not(:first-child) {
    margin-top: 9px;
}
.user-panel form .button {
    margin-top: 14px;
    justify-self: start;
}
.access-gate {
    max-width: 550px;
    margin: 80px auto;
    padding: 30px;
}
.access-gate h1 {
    font-size: 30px;
    margin-bottom: 14px;
}
.access-gate p {
    margin-bottom: 22px;
}

/* Order detail */
dialog {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    width: min(590px, calc(100% - 32px));
    padding: 25px;
    max-height: 85vh;
    overflow-y: auto;
}
dialog::backdrop {
    background: #18130e80;
}
.dialog-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dialog-heading h2 {
    font-size: 20px;
}
.detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
}
.detail-meta dt {
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 4px;
}
.detail-meta dd {
    margin: 0;
}
.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    border-top: 1px solid var(--line);
    padding-top: 18px;
    margin-top: 20px;
}

/* Responsive layout */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .store-nav {
        margin-left: 0;
        gap: 17px;
    }
    .header-inner {
        gap: 22px;
    }
    .account-copy {
        display: none;
    }
    .workspace-shell {
        grid-template-columns: 185px minmax(0, 1fr);
    }
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .analytics-toolbar {
        align-items: start;
    }
    .period-picker {
        display: grid;
        gap: 4px;
    }
}
@media (max-width: 900px) {
    .shell {
        width: calc(100% - 40px);
    }
    .header-inner {
        flex-wrap: wrap;
        padding: 14px 0 9px;
        gap: 14px;
    }
    .store-nav {
        order: 3;
        width: 100%;
        min-height: 30px;
    }
    .hero-copy {
        padding: 32px;
    }
    .store-hero {
        grid-template-columns: 1fr 1fr;
        min-height: 350px;
    }
    .room {
        min-height: 350px;
    }
    .room-sofa {
        left: 10px;
        transform: scale(0.85);
        transform-origin: bottom left;
    }
    .room-table {
        left: 130px;
    }
    .room-panel {
        left: 0;
        width: 70px;
    }
    .room-window {
        right: 12px;
        width: 145px;
    }
    .store-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
        gap: 18px;
    }
    .product-image {
        height: 150px;
    }
    .workspace-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .workspace-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 8px 20px;
    }
    .workspace-sidebar nav {
        display: flex;
        overflow-x: auto;
        gap: 3px;
    }
    .workspace-sidebar nav button {
        white-space: nowrap;
        padding: 10px;
    }
    .sidebar-store {
        display: none;
    }
    .workspace-content {
        padding: 25px 20px;
    }
    .analytics-grid {
        grid-template-columns: 1.5fr 1fr;
    }
    .workspace-header {
        padding-inline: 20px;
    }
    .workspace-label {
        display: none;
    }
    .workspace-divider {
        display: none;
    }
    .login-layout {
        gap: 35px;
    }
    .login-identity {
        min-height: 500px;
        padding: 25px;
    }
    .door-illustration {
        inset-inline: 10px;
    }
}
@media (max-width: 650px) {
    .shell {
        width: calc(100% - 32px);
    }
    .brand > span {
        font-size: 21px;
    }
    .brand img {
        width: 29px;
        height: 32px;
    }
    .header-actions {
        gap: 9px;
    }
    .account {
        gap: 0;
    }
    .preferences {
        gap: 5px;
    }
    .header-inner {
        gap: 11px;
    }
    .store-main {
        padding-top: 18px;
    }
    .store-hero {
        grid-template-columns: 1fr;
        margin-bottom: 34px;
    }
    .hero-copy {
        padding: 29px 26px 28px;
    }
    .hero-copy h1 {
        font-size: 38px;
        letter-spacing: -1.3px;
    }
    .hero-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    .room {
        min-height: 290px;
    }
    .room-sofa {
        left: 45px;
        bottom: 68px;
    }
    .room-table {
        left: 190px;
        bottom: 43px;
    }
    .room-window {
        width: 150px;
        height: 190px;
        right: 35px;
    }
    .room-panel {
        left: 20px;
        width: 85px;
        height: 240px;
    }
    .room-shelf {
        top: 175px;
        width: 160px;
    }
    .room-lamp {
        right: 23px;
        bottom: 72px;
        height: 145px;
    }
    .room-floor {
        height: 80px;
    }
    .room-caption {
        left: 20px;
        bottom: 12px;
        font-size: 9px;
    }
    .section-heading h2 {
        font-size: 25px;
    }
    .section-heading .muted {
        font-size: 12px;
    }
    .product-count {
        font-size: 11px;
    }
    .collection-toolbar > .search-field {
        flex-basis: 100%;
    }
    .category-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 3px;
    }
    .category-tabs button {
        white-space: nowrap;
        font-size: 11px;
        padding: 8px;
    }
    .store-layout {
        grid-template-columns: 1fr;
    }
    .product-grid {
        gap: 12px;
    }
    .product-image {
        height: 145px;
    }
    .product-copy {
        padding: 13px;
    }
    .product-copy h3 {
        font-size: 13px;
    }
    .product-price {
        font-size: 17px;
    }
    .quantity-row {
        gap: 5px;
    }
    .quantity-row > span {
        display: none;
    }
    .quantity-control {
        width: 100%;
        justify-content: space-between;
    }
    .quantity-control button {
        min-width: 35px;
        min-height: 36px;
    }
    .quantity-control input {
        height: 36px;
    }
    .cart-panel {
        position: static;
        margin-top: 10px;
    }
    .order-grid {
        grid-template-columns: 1fr;
    }
    .site-footer {
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 40px;
    }
    .site-footer > span {
        font-size: 10px;
    }
    .login-layout {
        display: block;
    }
    .login-identity {
        display: none;
    }
    .login-form-panel {
        margin-inline: auto;
        padding: 48px 0;
    }
    .workspace-header {
        padding: 12px 16px;
        gap: 10px;
    }
    .workspace-header .brand > span {
        font-size: 18px;
    }
    .workspace-header .header-actions {
        gap: 7px;
    }
    .workspace-sidebar {
        padding-inline: 8px;
    }
    .workspace-sidebar nav button {
        font-size: 12px;
        gap: 6px;
    }
    .workspace-sidebar nav .icon {
        width: 16px;
        height: 16px;
    }
    .workspace-content {
        padding: 22px 16px;
    }
    .workspace-title {
        gap: 10px;
    }
    .workspace-title h1 {
        font-size: 25px;
    }
    .workspace-title > .button {
        font-size: 11px;
        padding: 9px 10px;
    }
    .workspace-title > .button .icon {
        display: none;
    }
    .analytics-toolbar {
        flex-wrap: wrap;
        gap: 14px;
    }
    .period-picker {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }
    .kpi-grid {
        gap: 10px;
    }
    .kpi {
        padding: 14px;
    }
    .kpi p {
        font-size: 11px;
    }
    .kpi strong {
        font-size: 25px;
    }
    .kpi small {
        font-size: 10px;
    }
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    .top-products-panel {
        grid-column: auto;
    }
    .panel-heading {
        padding: 17px 16px 10px;
        gap: 10px;
    }
    .view-toolbar {
        flex-wrap: wrap;
    }
    .view-toolbar .search-field {
        flex-basis: 100%;
    }
    .view-toolbar > select {
        width: 100%;
    }
    .view-toolbar > .button {
        width: 100%;
    }
    .forecast-panel .panel-heading {
        flex-wrap: wrap;
    }
    .product-picker,
    .product-picker select {
        width: 100%;
    }
    td,
    th {
        padding: 12px;
    }
    table {
        min-width: 600px;
    }
    .table-panel {
        max-width: 100%;
    }
    .checkbox-field {
        font-size: 10px;
    }
    .model-details dl {
        gap: 20px;
    }
    .model-details {
        padding-inline: 16px;
    }
    dialog {
        padding: 18px;
    }
    .order-line {
        font-size: 12px;
    }
    .order-actions .button {
        flex: 1;
    }
}
.product-controls {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.product-controls input {
    width: 65px;
    min-width: 0;
    padding: 8px;
}
.product-controls button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
}
.product-price > span {
    font-size: 11px;
    font-weight: 400;
    margin-left: 5px;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.cart-item > div {
    flex: 1;
    min-width: 0;
}
.cart-item strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
}
.cart-item span {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    color: var(--muted);
}
.empty-cart {
    color: var(--muted);
    font-size: 12px;
    padding: 15px 0;
}
.rank-item {
    min-width: 0;
}
.rank-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 8px;
}
.rank-track {
    height: 5px;
    background: var(--surface-alt);
    border-radius: 2px;
    overflow: hidden;
}
.rank-fill {
    height: 100%;
    background: var(--accent);
}
.detail-receiving {
    margin: 16px 0;
}
@media (max-width: 650px) {
    .product-controls {
        flex-direction: column;
    }
    .product-controls input {
        width: 100%;
    }
}
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

/* Customer forecasts */
.demo-order-label {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
}
.customer-pickers {
    display: flex;
    gap: 10px;
    min-width: 0;
}
.customer-pickers select {
    max-width: 220px;
    min-width: 0;
}
.customer-chart-heading {
    flex-wrap: wrap;
}
.customer-expectation {
    padding: 4px 22px;
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-size: 12px;
}
.customer-expectation strong {
    font-size: 25px;
}
.customer-note {
    padding: 4px 22px 10px;
}
.customer-link {
    border: 0;
    color: var(--accent);
    background: transparent;
    padding: 4px 0;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.customer-link:hover {
    text-decoration: underline;
}
@media (max-width: 650px) {
    .customer-pickers {
        width: 100%;
        flex-wrap: wrap;
    }
    .customer-pickers select {
        flex: 1;
    }
}
