:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #20314a;
    --muted: #67809f;
    --primary: #145da0;
    --primary-dark: #0e477c;
    --secondary: #f4b942;
    --danger: #c44f4f;
    --border: #d7e1ee;
    --shadow: 0 18px 40px rgba(32, 49, 74, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #f9fbfe 0%, #eff4fa 100%);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
    padding: 1rem;
}

.login-shell {
    width: min(1080px, 100%);
    margin: 0 auto;
}

.login-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    background: var(--panel);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.brand-block {
    background: radial-gradient(circle at top left, #d7ebff 0%, #f6fbff 45%, #ffffff 100%);
    border-radius: 24px;
    padding: 32px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 10px;
}

.auth-form,
.demo-box,
.content-card,
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.filter-form input,
.filter-form select,
.inline-form input,
.inline-form select,
.stack-form input,
.stack-form textarea,
table input,
table select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 8px 0 16px;
    font: inherit;
}

.auth-form textarea,
.stack-form textarea {
    min-height: 120px;
    max-height: 120px;
    resize: none;
    overflow-y: auto;
}

.auth-form input[type="text"],
.stack-form input[type="text"],
.inline-form input[type="text"] {
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    text-overflow: clip;
}

.btn {
    border: 0;
    border-radius: 12px;
    max-width: 100%;
    padding: 0.6875rem 1rem;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    white-space: normal;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #e7eef8;
    color: var(--text);
}

.btn-danger {
    background: #f9d8d8;
    color: #8a2f2f;
}

.btn-block {
    width: 100%;
}

.auth-link-btn {
    margin-top: 12px;
}

.auth-form-helper-row {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 14px;
}

.auth-inline-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.auth-inline-link:hover {
    color: var(--primary-dark);
}

.login-page-modern {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    align-items: start;
    background:
        radial-gradient(circle at 15% 20%, rgba(76, 201, 240, 0.28), transparent 18%),
        radial-gradient(circle at 85% 18%, rgba(255, 183, 3, 0.26), transparent 16%),
        radial-gradient(circle at 82% 78%, rgba(247, 37, 133, 0.22), transparent 18%),
        linear-gradient(135deg, #081a35 0%, #102752 30%, #173b66 65%, #0f7b83 100%);
    color: #f7fbff;
}

body.login-account-page {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-account-page {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
}

.login-account-page::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.login-page-modern::before,
.login-page-modern::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(10px);
    opacity: 0.9;
    pointer-events: none;
}

.login-page-modern::before {
    width: 340px;
    height: 340px;
    top: -80px;
    left: -70px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.36), rgba(76, 201, 240, 0.06));
}

.login-page-modern::after {
    width: 280px;
    height: 280px;
    right: -60px;
    bottom: -60px;
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.28), rgba(247, 37, 133, 0.12));
}

.login-shell-modern {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    display: grid;
    gap: 0.875rem;
}

.login-account-page .login-shell-modern {
    height: auto;
    overflow: visible;
    grid-template-rows: auto;
}

.login-hero {
    text-align: center;
    color: #f5fbff;
}

.login-hero-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 10px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(238, 247, 255, 0.86);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 10px 25px rgba(5, 15, 30, 0.2);
}

.login-hero-top {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    color: #ffffff;
    text-shadow: 0 18px 40px rgba(4, 13, 28, 0.42);
}

.login-hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 8px;
    max-width: 520px;
}

.login-hero-divider span {
    flex: 1;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 214, 102, 0.95), rgba(255, 255, 255, 0.2));
}

.login-hero-divider strong {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffd666;
    text-transform: uppercase;
}

.login-hero h1 {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.45rem);
    line-height: 1.1;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #cdefff;
    text-shadow: 0 12px 28px rgba(4, 13, 28, 0.28);
}

.login-hero-text {
    width: min(460px, 100%);
    margin: 0.5rem auto 0;
    font-size: 0.86rem;
    line-height: 1.45;
    color: rgba(235, 246, 255, 0.8);
}

.login-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    gap: 0.875rem;
    align-items: stretch;
    min-height: 0;
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: 0.875rem;
    background:
        linear-gradient(160deg, rgba(9, 25, 45, 0.9) 0%, rgba(18, 41, 83, 0.84) 48%, rgba(18, 103, 110, 0.78) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 42px rgba(3, 11, 28, 0.24);
}

.login-brand-panel::before,
.login-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-brand-panel::before {
    width: 240px;
    height: 240px;
    top: -90px;
    right: -40px;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.45) 0%, rgba(255, 183, 3, 0) 70%);
}

.login-brand-panel::after {
    width: 280px;
    height: 280px;
    bottom: -120px;
    left: -90px;
    background: radial-gradient(circle, rgba(247, 37, 133, 0.26) 0%, rgba(247, 37, 133, 0) 72%);
}

.login-brand-copy,
.login-card-modern {
    position: relative;
    z-index: 1;
}

.login-brand-copy h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.1;
    color: #ffffff;
}

.login-brand-copy p {
    max-width: 540px;
    margin: 0.5rem 0 0;
    color: rgba(230, 243, 255, 0.82);
    line-height: 1.5;
}

.login-brand-description {
    font-size: 0.88rem;
}

.login-product-reel-block {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
}

.login-product-reel-shell {
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding: 0.35rem 0;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.login-product-reel-track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: max-content;
    animation: loginProductReel 18s linear infinite;
}

.login-product-reel-card {
    flex: 0 0 auto;
    width: 240px;
    height: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}

.login-product-reel-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-product-reel-empty {
    padding: 0.75rem 0;
    color: rgba(230, 243, 255, 0.78);
    font-size: 0.82rem;
}

@keyframes loginProductReel {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 0.375rem));
    }
}

.login-brand-features {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.625rem;
    margin-top: 0.875rem;
}

.login-brand-feature {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.875rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-brand-feature-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(76, 201, 240, 0.92), rgba(67, 97, 238, 0.86));
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.login-brand-feature h3 {
    margin: 0;
    font-size: 0.98rem;
    color: #ffffff;
}

.login-brand-feature p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: rgba(230, 243, 255, 0.78);
}

.login-card-modern {
    position: relative;
    overflow: hidden;
    grid-template-columns: 1fr;
    gap: 0.875rem;
    padding: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 248, 255, 0.94) 100%);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(6, 18, 36, 0.2);
}

.login-card-modern::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4cc9f0 0%, #4361ee 35%, #f72585 70%, #ffb703 100%);
}

.login-card-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1) 0%, rgba(76, 201, 240, 0.14) 45%, rgba(255, 183, 3, 0.14) 100%);
    border: 1px solid rgba(163, 191, 224, 0.32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.login-card-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    min-height: 62px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(135deg, #123e7a 0%, #2758a5 55%, #31b4d6 100%);
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    box-shadow: 0 12px 24px rgba(39, 88, 165, 0.22);
}

.login-card-header-copy {
    text-align: left;
}

.login-card-kicker {
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.66rem;
    color: #0f7b83;
    font-weight: 700;
}

.login-card-header h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-family: Georgia, "Times New Roman", serif;
    color: #0d2442;
}

.login-card-header p {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: #5f7392;
}

.auth-form-modern {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid #d8e5f3;
    padding: 0;
}

.auth-form-modern label {
    display: block;
    margin-bottom: 8px;
    color: #163455;
    font-weight: 600;
}

.auth-form-modern input {
    margin: 0 0 0.875rem;
    padding: 0.8125rem 0.9375rem;
    border: 1px solid #d2e1f0;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
    color: #102139;
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.auth-form-modern input::placeholder {
    color: #89a0b8;
}

.auth-form-modern input:focus {
    outline: none;
    border-color: #4cc9f0;
    box-shadow: 0 0 0 4px rgba(76, 201, 240, 0.16);
}

.login-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0;
}

.login-actions .btn {
    width: 100%;
    min-height: 54px;
    border-radius: 16px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-actions .btn:hover {
    transform: translateY(-2px);
}

.login-page-modern .btn-primary {
    background: linear-gradient(135deg, #4361ee 0%, #4cc9f0 100%);
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(67, 97, 238, 0.28);
}

.login-page-modern .btn-primary:hover {
    background: linear-gradient(135deg, #3a56d8 0%, #3bbce7 100%);
}

.login-page-modern .btn-secondary {
    background: linear-gradient(135deg, #ffb703 0%, #f72585 100%);
    color: #ffffff;
    box-shadow: 0 16px 28px rgba(247, 37, 133, 0.18);
}

.login-page-modern .auth-link-btn {
    margin-top: 0;
}

.login-help-box {
    background: linear-gradient(135deg, #eef8ff 0%, #fff8e8 100%);
    border: 1px solid #dce8f5;
    color: #183450;
    padding: 0.875rem;
    border-radius: 16px;
}

.login-help-box h3 {
    margin-top: 0;
    color: #0d2442;
}

.login-help-box p {
    margin-bottom: 0;
    color: #4c6482;
}

.create-account-page {
    display: block;
    min-height: 100vh;
    padding: 12px 20px 16px;
}

.create-account-page .login-shell-modern {
    width: min(920px, 100%);
    gap: 10px;
}

.create-account-page .login-hero-tag {
    margin-bottom: 6px;
    padding: 4px 11px;
    font-size: 0.62rem;
}

.create-account-page .login-hero-top {
    margin-bottom: 4px;
    font-size: clamp(1.55rem, 2.6vw, 2.05rem);
}

.create-account-page .login-hero-divider {
    margin-bottom: 4px;
}

.create-account-page .login-hero h1 {
    font-size: clamp(0.84rem, 1.45vw, 1.04rem);
    letter-spacing: 0.08em;
}

.create-account-page .login-hero-text {
    width: min(520px, 100%);
    margin-top: 4px;
    font-size: 0.74rem;
    line-height: 1.32;
}

.create-account-page .login-stage {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
    gap: 10px;
    align-items: start;
}

.create-account-info-column {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.create-account-page .login-brand-panel,
.create-account-page .login-card-modern {
    padding: 10px;
}

.create-account-page .login-brand-copy h2 {
    font-size: clamp(1.02rem, 1.8vw, 1.4rem);
}

.create-account-page .login-brand-copy p {
    margin-top: 6px;
    line-height: 1.34;
}

.create-account-page .login-brand-description {
    font-size: 0.74rem;
}

.create-account-page .login-brand-features {
    gap: 7px;
    margin-top: 10px;
}

.create-account-page .login-brand-feature {
    grid-template-columns: 40px 1fr;
    gap: 9px;
    padding: 8px 10px;
}

.create-account-page .login-brand-feature-number {
    width: 36px;
    height: 36px;
    font-size: 0.68rem;
}

.create-account-page .login-brand-feature h3 {
    font-size: 0.82rem;
}

.create-account-page .login-brand-feature p {
    font-size: 0.7rem;
    line-height: 1.28;
}

.create-account-page .login-card-header {
    gap: 7px;
    padding: 7px 9px;
}

.create-account-page .login-card-header-badge {
    min-width: 48px;
    min-height: 48px;
    font-size: 0.5rem;
}

.create-account-page .login-card-kicker {
    margin-bottom: 3px;
    font-size: 0.56rem;
    letter-spacing: 0.14em;
}

.create-account-page .login-card-header h2 {
    font-size: clamp(0.98rem, 1.5vw, 1.2rem);
}

.create-account-page .auth-form-modern label {
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.create-account-page .auth-form-modern input {
    margin: 0 0 8px;
    padding: 9px 12px;
    font-size: 0.82rem;
}

.create-account-page .login-actions {
    gap: 7px;
    margin-top: 0;
}

.create-account-page .login-actions .btn {
    min-height: 38px;
    font-size: 0.8rem;
}

.create-account-page .login-help-box {
    padding: 9px;
}

.create-account-page .login-help-box h3 {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.create-account-page .login-help-box p {
    font-size: 0.74rem;
    line-height: 1.32;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.alert-success {
    background: #dff3e8;
    color: #166f47;
}

.alert-danger {
    background: #fbe0e0;
    color: #9e3333;
}

.app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #17304d;
    color: #fff;
    padding: 1rem;
}

.sidebar-mobile-head,
.sidebar-close-btn,
.sidebar-toggle-btn,
.sidebar-backdrop {
    display: none;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    margin-top: 28px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-nav.store-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sidebar-nav.store-nav a {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.82rem;
    justify-content: center;
    text-align: center;
}

.nav-pill {
    background: var(--secondary);
    color: #263340;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.nav-pill.is-hidden {
    display: none;
}

.nav-pill-alert {
    background: #d63b3b;
    color: #ffffff;
}

.retail-cart-inline-popup {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% - 8px);
    z-index: 8;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 14px 28px rgba(17, 35, 61, 0.16);
}

.retail-cart-inline-popup::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 100%;
    border-width: 8px 7px 0 7px;
    border-style: solid;
    border-color: transparent;
}

.retail-cart-inline-popup.is-success {
    background: #dff3e8;
    color: #1b7c51;
}

.retail-cart-inline-popup.is-success::after {
    border-top-color: #dff3e8;
}

.retail-cart-inline-popup.is-notice {
    background: var(--primary);
    color: #ffffff;
}

.retail-cart-inline-popup.is-notice::after {
    border-top-color: var(--primary);
}

.retail-cart-inline-popup.is-error {
    background: #ffe1e1;
    color: #c62828;
}

.retail-cart-inline-popup.is-error::after {
    border-top-color: #ffe1e1;
}

.chat-shortcut-card {
    margin-bottom: 22px;
}

.chat-layout-card {
    padding: 18px;
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

.chat-sidebar,
.chat-main {
    min-width: 0;
}

.chat-contact-list {
    display: grid;
    gap: 10px;
}

.chat-contact-card {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f9fbfe;
}

.chat-contact-card strong {
    font-size: 0.96rem;
}

.chat-contact-card span,
.chat-contact-card small {
    color: var(--muted);
}

.chat-contact-card.is-active {
    border-color: rgba(20, 93, 160, 0.28);
    background: linear-gradient(180deg, #edf5ff 0%, #f8fbff 100%);
    box-shadow: 0 12px 28px rgba(20, 93, 160, 0.08);
}

.chat-main-head {
    margin-bottom: 14px;
}

.chat-thread {
    display: grid;
    gap: 12px;
    max-height: 540px;
    overflow-y: auto;
    padding: 4px 4px 4px 0;
    margin-bottom: 16px;
}

.chat-bubble {
    width: min(100%, 620px);
    padding: 14px 16px;
    border-radius: 18px 18px 18px 6px;
    background: #edf3fa;
    border: 1px solid #d7e2ef;
}

.chat-bubble.is-own {
    margin-left: auto;
    border-radius: 18px 18px 6px 18px;
    background: linear-gradient(180deg, #145da0 0%, #1d73c2 100%);
    border-color: #145da0;
    color: #ffffff;
}

.chat-bubble strong,
.chat-bubble span {
    display: block;
}

.chat-bubble strong {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.chat-bubble p {
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-image-link {
    display: inline-block;
    margin-top: 10px;
}

.chat-image {
    width: min(240px, 100%);
    max-height: 220px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(32, 49, 74, 0.12);
    background: #ffffff;
}

.chat-upload-note {
    color: var(--muted);
    font-size: 0.82rem;
}

.chat-bubble span {
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--muted);
}

.chat-bubble.is-own span {
    color: rgba(255, 255, 255, 0.82);
}

.chat-compose-form {
    display: grid;
    gap: 12px;
}

.chat-compose-form label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.chat-compose-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    resize: vertical;
    font: inherit;
}

.chat-compose-actions {
    display: flex;
    justify-content: flex-end;
}

.main-content {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    min-width: 0;
    overflow-x: clip;
}

.page-header,
.toolbar,
.summary-bar,
.actions-row,
.invoice-header,
.invoice-grid {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    align-items: stretch;
}

.toolbar,
.stats-grid,
.grid-cards,
.content-card,
.invoice-card {
    margin-bottom: 24px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1 1 100%;
    min-width: 0;
}

.filter-form input,
.filter-form select {
    flex: 1 1 100%;
    margin: 0;
    min-width: 0;
}

.filter-form .btn {
    flex: 1 1 100%;
}

.invoice-filter-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 18px;
    width: 100%;
    gap: 0.75rem;
}

.search-stack {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.search-stack input {
    flex: 0 0 auto;
    margin: 0;
    width: 100%;
}

.search-stack .btn {
    width: 100%;
    min-width: 0;
}

.invoice-filter-select {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
}

.retail-filter-bar {
    display: flex;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    min-width: 0;
}

.filter-form-search,
.filter-form-category {
    flex: 1 1 100%;
    min-width: 0;
}

.filter-form-search input,
.filter-form-category select {
    width: 100%;
    min-width: 0;
}

.content-card,
.stat-card,
.product-card,
.product-body,
.stack-form,
.inline-form,
.table td,
.table th {
    min-width: 0;
}

.grid-cards,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
}

.product-gallery-trigger {
    display: block;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.product-gallery-trigger img {
    transition: transform 0.2s ease, filter 0.2s ease;
}

.product-gallery-trigger:hover img,
.product-gallery-trigger:focus-visible img {
    transform: scale(1.2);
    filter: saturate(1.04);
}

.product-body {
    padding: 0.875rem;
}

.product-body h3,
.product-body p {
    overflow-wrap: anywhere;
}

.product-body .tag {
    padding: 0.3rem 0.55rem;
    font-size: 0.68rem;
}

.product-name-box {
    min-height: auto;
    max-height: none;
    margin: 0.5rem 0;
    overflow: visible;
    white-space: normal;
    padding-bottom: 0;
}

.product-name-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.3;
    font-weight: 700;
    display: block;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}

.product-body p {
    max-height: 84px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0.625rem;
    padding-right: 0.375rem;
    font-size: 0.8rem;
    line-height: 1.45;
    scrollbar-width: none;
}

.product-brand-line {
    margin: 0 0 0.45rem;
    color: #5c7693;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.35;
}

.product-name-box::-webkit-scrollbar,
.product-body p::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.product-name-box:hover,
.product-name-box:focus-within,
.product-body p:hover,
.product-body p:focus {
    scrollbar-width: thin;
}

.product-name-box:hover::-webkit-scrollbar,
.product-name-box:focus-within::-webkit-scrollbar {
    height: 6px;
}

.product-body p:hover::-webkit-scrollbar,
.product-body p:focus::-webkit-scrollbar {
    width: 6px;
}

.product-name-box:hover::-webkit-scrollbar-thumb,
.product-name-box:focus-within::-webkit-scrollbar-thumb,
.product-body p:hover::-webkit-scrollbar-thumb,
.product-body p:focus::-webkit-scrollbar-thumb {
    background: rgba(97, 122, 153, 0.55);
    border-radius: 999px;
}

.product-name-box:hover::-webkit-scrollbar-track,
.product-name-box:focus-within::-webkit-scrollbar-track,
.product-body p:hover::-webkit-scrollbar-track,
.product-body p:focus::-webkit-scrollbar-track {
    background: rgba(215, 225, 238, 0.45);
    border-radius: 999px;
}

.product-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.625rem;
    font-size: 0.8rem;
    line-height: 1.35;
}

.product-meta strong {
    font-size: 0.96rem;
    line-height: 1.2;
}

.product-gallery-modal[hidden] {
    display: none;
}

.product-gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.product-gallery-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 62, 0.72);
    backdrop-filter: blur(8px);
}

.product-gallery-dialog {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
    margin: 0.75rem auto;
    overflow: auto;
    border-radius: 26px;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 247, 255, 0.96) 100%);
    border: 1px solid rgba(215, 225, 238, 0.9);
    box-shadow: 0 26px 60px rgba(9, 24, 49, 0.3);
}

.product-gallery-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-bottom: 0.75rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #e7eef8;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.product-gallery-layout {
    display: grid;
    gap: 1rem;
}

.product-gallery-visual,
.product-gallery-copy {
    min-width: 0;
}

.product-gallery-main-shell {
    overflow: hidden;
    border-radius: 22px;
    background:
        radial-gradient(circle at top left, rgba(20, 93, 160, 0.12), transparent 28%),
        linear-gradient(180deg, #f6fbff 0%, #eef5fc 100%);
    border: 1px solid rgba(215, 225, 238, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-gallery-main-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
}

.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 0.7rem;
    margin-top: 0.85rem;
}

.product-gallery-thumb {
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid transparent;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(20, 49, 74, 0.08);
}

.product-gallery-thumb.is-active {
    border-color: var(--secondary);
    box-shadow: 0 14px 28px rgba(244, 185, 66, 0.24);
}

.product-gallery-thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.product-gallery-kicker {
    margin: 0 0 0.5rem;
    color: #0f7b83;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.product-gallery-copy h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.6vw, 2.4rem);
    line-height: 1.05;
    color: #102744;
}

.product-gallery-description {
    margin: 0.8rem 0 0;
    color: #5d7693;
    font-size: 0.92rem;
    line-height: 1.6;
}

.product-gallery-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.product-gallery-info-card {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #edf5fd 100%);
    border: 1px solid rgba(215, 225, 238, 0.95);
}

.product-gallery-info-card-wide {
    grid-column: 1 / -1;
}

.product-gallery-info-card span {
    display: block;
    margin-bottom: 0.45rem;
    color: #6a84a2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-gallery-info-card strong {
    color: #17304d;
    font-size: 1rem;
    line-height: 1.3;
}

.tag,
.status-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.tag {
    background: #e8f2ff;
    color: var(--primary);
}

.status-pending {
    background: #fff1d6;
    color: #8e6406;
}

.status-preparing {
    background: #dde8ff;
    color: #2856a8;
}

.status-ready {
    background: #dff2ff;
    color: #1173a0;
}

.status-delivered {
    background: #dff3e8;
    color: #1b7c51;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    min-width: 36rem;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.inline-form {
    margin: 0;
}

.inline-form[data-add-to-cart-form] {
    position: relative;
}

.inline-form input[type="number"] {
    margin: 0 0 0.5rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
}

.inline-form .btn {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.inline-form select {
    margin-bottom: 0;
}

.table-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
}

.order-action-box {
    min-width: 0;
}

.order-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 12px;
}

.product-name-cell {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.empty-state {
    background: var(--panel);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    color: var(--muted);
}

.office-admin-form-card {
    margin-bottom: 24px;
}

.office-admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.office-admin-card-head h2 {
    margin-bottom: 6px;
}

.office-admin-card-head p {
    margin: 0;
    color: var(--muted);
}

.office-admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.office-admin-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.office-admin-form input,
.office-admin-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    font: inherit;
}

.office-admin-form-wide {
    grid-column: 1 / -1;
}

.office-admin-form-actions {
    display: flex;
    align-items: end;
}

.office-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.office-day-closing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 24px;
    align-items: start;
}

.office-day-invoice-list,
.office-day-closing-form-wrap {
    min-width: 0;
}

.office-day-invoice-list .office-scroll-box,
.office-day-closing-form-wrap .office-scroll-box {
    border-radius: 16px;
    border: 1px solid #e1ebf5;
    background: #fff;
}

.office-day-invoice-table,
.office-day-report-table {
    min-width: 42rem;
}

.office-day-closing-form {
    align-items: start;
}

.office-subsection-head {
    margin-bottom: 14px;
}

.office-subsection-head h3 {
    margin: 0 0 6px;
}

.office-subsection-head p {
    margin: 0;
    color: var(--muted);
}

.office-scroll-box {
    max-height: 440px;
    overflow: auto;
}

.office-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding-right: 4px;
}

.office-stock-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.office-stock-card-out {
    border-color: #ef9a9a;
    background: #fff1f1;
}

.office-stock-image {
    flex-shrink: 0;
}

.office-stock-copy h3,
.office-stock-copy p,
.office-stock-copy strong {
    margin: 0 0 6px;
}

.office-stock-copy p {
    color: var(--muted);
}

.office-stock-label,
.stock-out {
    color: #c62828;
    font-weight: 700;
}

.amount-positive {
    color: #1b7c51;
    font-weight: 700;
}

.office-stock-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffd9d9;
}

.office-bill-preview {
    padding: 16px 18px;
    border: 1px solid #dce8f5;
    border-radius: 16px;
    background: #f7fbff;
}

.office-bill-preview strong,
.office-bill-preview p {
    margin: 0;
}

.office-bill-preview p {
    margin-top: 8px;
}

.office-clickable-row {
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.office-clickable-row:hover {
    background: #f4f9ff;
}

.office-clickable-row.is-selected {
    background: #e8f3ff;
    box-shadow: inset 0 0 0 1px #7db7f0;
}

.office-clickable-row-disabled {
    cursor: default;
    opacity: 0.72;
    background: #fafafa;
}

.office-clickable-row td:first-child {
    min-width: 10rem;
}

.office-row-status {
    display: inline-flex;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dff3e8;
    color: #1b7c51;
    font-size: 0.72rem;
    font-weight: 700;
}

.cart-page .table td input[type="number"] {
    margin: 0;
}

.cart-page-modern {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(76, 201, 240, 0.18), transparent 22%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid #d9e5f2;
    box-shadow: 0 20px 46px rgba(16, 36, 66, 0.08);
}

.cart-hero {
    margin-bottom: 1.25rem;
}

.cart-hero h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.02;
    color: #163455;
}

.cart-hero-model {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-hero-model h1 {
    margin: 0;
}

.cart-hero-close {
    border: 0;
    background: transparent;
    color: #5f7392;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex: 0 0 auto;
}

.cart-hero-text {
    max-width: 38rem;
    margin: 0;
    color: #617a99;
    font-size: 0.96rem;
    line-height: 1.5;
}

.cart-table-wrap {
    margin-bottom: 1rem;
}

.cart-table {
    min-width: 100%;
}

.cart-table th {
    color: #4c6482;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cart-item-row td {
    vertical-align: middle;
}

.cart-product-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #183450;
    overflow-wrap: anywhere;
}

.cart-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #f6fbff;
    border: 1px solid #dce8f5;
}

.cart-col-price,
.cart-col-subtotal {
    font-weight: 700;
    color: #163455;
}

.cart-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
}

.cart-qty-btn {
    width: 2.7rem;
    min-width: 2.7rem;
    height: 2.7rem;
    border: 1px solid #d5e1ef;
    background: #ffffff;
    color: #183450;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.cart-qty-btn-minus {
    border-radius: 12px 0 0 12px;
}

.cart-qty-btn-plus {
    border-radius: 0;
    border-left: 0;
}

.cart-qty-control input[type="number"] {
    width: 3.4rem;
    min-width: 3.4rem;
    height: 2.7rem;
    margin: 0;
    border: 1px solid #d5e1ef;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    text-align: center;
    font-weight: 700;
    padding: 0.35rem;
    -moz-appearance: textfield;
}

.cart-qty-control input[type="number"]::-webkit-outer-spin-button,
.cart-qty-control input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-remove-btn {
    min-width: 7rem;
    margin-left: 0.55rem;
    min-height: 2.7rem;
    border-radius: 0 12px 12px 0;
}

.cart-summary-model {
    gap: 0.9rem;
    padding: 1.15rem 1.2rem;
    border: 1px solid #d8e5f3;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.cart-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #5f7392;
    font-size: 0.98rem;
    line-height: 1.4;
}

.cart-summary-line-total {
    padding-top: 1rem;
    border-top: 1px solid #dbe7f3;
    color: #163455;
}

.cart-summary-line-total .cart-summary-key,
.cart-summary-line-total .cart-summary-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.cart-summary-key {
    color: inherit;
}

.cart-summary-value {
    color: inherit;
    font-weight: 700;
    text-align: right;
}

.cart-actions-model {
    margin-top: 0.25rem;
}

.cart-checkout-btn {
    width: 100%;
    min-height: 3.5rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 18px;
}

.checkbox-row input {
    width: auto;
    margin: 0;
}

.preview-image {
    width: min(100%, 11.25rem);
    aspect-ratio: 18 / 13;
    height: auto;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 18px;
}

.stat-card span {
    color: var(--muted);
    display: block;
    margin-bottom: 10px;
}

.stat-card strong {
    font-size: 28px;
}

.invoice-grid {
    align-items: flex-start;
    margin: 20px 0;
}

.invoice-total {
    text-align: right;
    margin-top: 18px;
    font-size: 20px;
    overflow-wrap: anywhere;
}

.orders-showcase {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 26px;
    background:
        linear-gradient(rgba(16, 16, 18, 0.78), rgba(16, 16, 18, 0.72)),
        radial-gradient(circle at top left, rgba(76, 201, 240, 0.24), transparent 22%),
        radial-gradient(circle at 88% 18%, rgba(255, 183, 3, 0.22), transparent 16%),
        radial-gradient(circle at 84% 82%, rgba(247, 37, 133, 0.14), transparent 18%),
        linear-gradient(140deg, #0b1f3e 0%, #123267 42%, #125e79 100%);
    color: #f3fbff;
    box-shadow: 0 26px 60px rgba(9, 24, 49, 0.24);
}

.orders-showcase::before {
    content: "";
    position: absolute;
    inset: auto auto -60px -30px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.28) 0%, rgba(67, 97, 238, 0) 72%);
    pointer-events: none;
}

.orders-showcase-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.orders-showcase-copy {
    max-width: 500px;
}

.orders-showcase-kicker,
.orders-empty-kicker,
.order-story-label {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 700;
}

.orders-showcase-kicker,
.orders-empty-kicker {
    color: #ffd166;
}

.orders-showcase h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    line-height: 1.02;
    color: #ffffff;
}

.orders-showcase-text {
    margin: 6px 0 0;
    max-width: 460px;
    color: rgba(231, 244, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.45;
}

.orders-showcase-orbit {
    position: relative;
    flex: 0 0 auto;
    width: min(6.6rem, 28vw);
    height: min(6.6rem, 28vw);
    display: grid;
    place-items: center;
}

.orders-orbit-ring,
.orders-orbit-core {
    position: absolute;
    border-radius: 50%;
}

.orders-orbit-ring-one {
    inset: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.orders-orbit-ring-two {
    inset: 26px;
    border: 1px dashed rgba(76, 201, 240, 0.6);
}

.orders-orbit-core {
    inset: 52px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f72585 0%, #ffb703 100%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow: 0 18px 36px rgba(247, 37, 133, 0.28);
}

.orders-summary-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.875rem;
}

.orders-summary-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
}

.orders-summary-card-primary {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.24), rgba(76, 201, 240, 0.18));
}

.orders-summary-card-accent {
    background: linear-gradient(135deg, rgba(247, 37, 133, 0.18), rgba(255, 183, 3, 0.18));
}

.orders-summary-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(233, 245, 255, 0.74);
}

.orders-summary-card strong {
    font-size: clamp(1.3rem, 2vw, 2rem);
    color: #ffffff;
}

.orders-status-strip {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.orders-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.orders-status-chip-pending {
    color: #ffe08a;
}

.orders-status-chip-preparing {
    color: #bed0ff;
}

.orders-status-chip-ready {
    color: #a8eeff;
}

.orders-status-chip-delivered {
    color: #b9f0d0;
}

.orders-timeline {
    display: grid;
    gap: 16px;
}

.order-story-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.order-story-rail {
    display: none;
}

.order-story-node {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    margin-top: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4cc9f0 0%, #4361ee 48%, #f72585 100%);
    box-shadow: 0 12px 26px rgba(67, 97, 238, 0.24);
}

.order-story-line {
    position: absolute;
    top: 44px;
    bottom: -16px;
    width: 2px;
    background: linear-gradient(180deg, rgba(76, 201, 240, 0.36), rgba(215, 225, 238, 0.12));
}

.order-story-card:last-child .order-story-line {
    display: none;
}

.order-story-panel {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 251, 255, 0.95) 100%);
    border: 1px solid #d6e4f2;
    box-shadow: 0 18px 42px rgba(20, 49, 80, 0.08);
}

.order-story-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #4cc9f0 0%, #4361ee 42%, #f72585 82%, #ffb703 100%);
}

.order-story-top,
.order-story-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.order-story-label {
    color: #0f7b83;
}

.order-story-top h3 {
    margin: 0;
    font-size: 1.35rem;
    color: #102744;
}

.order-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin: 14px 0;
}

.order-story-detail {
    padding: 11px 13px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f5faff 0%, #edf6ff 100%);
    border: 1px solid #dbe8f5;
}

.order-story-detail span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b83a3;
}

.order-story-detail strong {
    color: #133256;
    font-size: 1rem;
}

.order-story-note {
    margin: 0;
    color: #607791;
    line-height: 1.5;
}

.order-story-action {
    min-width: 138px;
}

.orders-empty-state {
    padding: 34px;
    border: 1px dashed #c6d9eb;
    background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
}

.orders-empty-state h3 {
    margin: 0 0 10px;
    color: #102744;
}

.orders-empty-state p {
    max-width: 520px;
    margin: 0 auto 18px;
    color: #667d98;
    line-height: 1.6;
}

.print-page {
    background: #fff;
    padding: 24px;
}

.print-sheet {
    max-width: 900px;
    margin: 0 auto;
}

.sidebar-brand,
.user-chip,
.toolbar > *,
.page-header > *,
.invoice-grid > *,
.invoice-header > * {
    min-width: 0;
}

.user-chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
}

.user-chip-name {
    font-weight: 700;
    line-height: 1.2;
}

.user-chip-meta {
    color: #6a84a2;
    font-size: 0.74em;
    line-height: 1.2;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

@media (min-width: 40rem) {
    .main-content {
        padding: 1.25rem;
    }

    .stats-grid,
    .orders-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-header,
    .toolbar,
    .summary-bar,
    .actions-row,
    .invoice-header,
    .invoice-grid {
        flex-direction: row;
        align-items: center;
    }

    .filter-form {
        flex-direction: row;
        align-items: center;
    }

    .filter-form .btn {
        flex: 0 0 auto;
    }

    .invoice-filter-form {
        flex-direction: row;
        align-items: flex-start;
    }

    .retail-filter-bar {
        flex-direction: row;
        align-items: flex-start;
    }

    .product-meta,
    .order-action-buttons {
        flex-direction: row;
        align-items: center;
    }

    .orders-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-gallery-layout {
        grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
        align-items: start;
    }
}

@media (min-width: 56.25rem) {
    .app-shell {
        grid-template-columns: 16.25rem minmax(0, 1fr);
    }

    .sidebar {
        padding: 1.5rem 1.25rem;
    }

    .main-content {
        padding: 1.75rem;
    }

    .grid-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    }

    .orders-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .orders-showcase-hero {
        flex-direction: row;
        align-items: center;
    }

    .order-story-card {
        grid-template-columns: 1.75rem minmax(0, 1fr);
    }

    .order-story-rail {
        position: relative;
        display: flex;
        justify-content: center;
    }

    .order-story-top,
    .order-story-footer {
        flex-direction: row;
        align-items: center;
    }

    .order-story-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-body {
        padding: 1rem;
    }

    .product-body .tag {
        font-size: 0.8rem;
    }

    .product-name-text {
        font-size: 1.08rem;
    }

    .product-body p {
        font-size: 0.92rem;
        line-height: 1.48;
    }

    .product-meta {
        font-size: 0.92rem;
    }

    .product-meta strong {
        font-size: 1.08rem;
    }

    .inline-form input[type="number"],
    .inline-form .btn {
        font-size: 0.9rem;
    }
}

@media (min-width: 75rem) {
    .grid-cards {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .product-body {
        padding: 0.75rem;
    }

    .product-body .tag {
        font-size: 0.7rem;
    }

    .product-name-text {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .product-body p {
        font-size: 0.78rem;
        line-height: 1.3;
    }

    .product-meta {
        gap: 0.2rem;
        font-size: 0.76rem;
    }

    .product-meta strong {
        font-size: 0.92rem;
    }

    .inline-form input[type="number"] {
        padding: 0.45rem 0.55rem;
        font-size: 0.76rem;
    }

    .inline-form .btn {
        min-height: 2.1rem;
        padding: 0.45rem 0.55rem;
        font-size: 0.76rem;
    }
}

@media (max-width: 1180px) {
    .login-page {
        padding: 16px;
    }

    .login-shell-modern {
        gap: 16px;
    }

    .login-stage {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
        gap: 14px;
    }

    .login-brand-panel,
    .login-card-modern {
        padding: 16px;
    }

    .orders-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .login-brand-copy h2 {
        font-size: clamp(1.25rem, 2vw, 1.8rem);
    }

    .login-brand-feature {
        padding: 10px;
    }
}

@media (max-width: 900px) {
    .login-card,
    .app-shell {
        grid-template-columns: 1fr;
    }

    .orders-showcase-hero {
        align-items: center;
        gap: 14px;
    }

    .orders-showcase-orbit {
        flex-basis: 110px;
        width: 110px;
        height: 110px;
    }

    .order-story-top,
    .order-story-footer {
        flex-direction: row;
        align-items: center;
        gap: 0.65rem;
    }

    .order-story-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 20px 18px;
    }

    .sidebar-nav {
        margin-top: 18px;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .role-store .page-header {
        gap: 0.7rem;
    }

    .role-store .page-header .eyebrow {
        margin-bottom: 4px;
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .role-store .page-header h1 {
        font-size: 1.55rem;
        line-height: 1.08;
    }

    .role-store .user-chip {
        padding: 0.5rem 0.8rem;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .store-orders-page {
        padding: 18px 20px;
    }

    .store-orders-table {
        min-width: 34rem;
    }

    .store-orders-table th,
    .store-orders-table td {
        padding: 10px 10px;
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .store-orders-table th {
        font-size: 0.76rem;
    }

    .store-orders-page .status-badge {
        padding: 4px 8px;
        font-size: 0.68rem;
    }

    .store-order-form select {
        margin: 0;
        padding: 0.45rem 0.55rem;
        font-size: 0.76rem;
    }

    .store-orders-page .order-action-buttons {
        gap: 0.45rem;
        margin-top: 8px;
    }

    .store-orders-page .order-action-buttons .btn {
        min-height: 2.1rem;
        padding: 0.45rem 0.6rem;
        font-size: 0.74rem;
    }

    .cart-page {
        padding: 18px;
        border-radius: 20px;
    }

    .cart-table {
        min-width: 33rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 11px 9px;
        font-size: 0.88rem;
    }

    .cart-table th {
        font-size: 0.8rem;
    }

    .cart-page .table-thumb {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }

    .cart-page .table td input[type="number"] {
        width: 4.4rem;
        padding: 0.5rem 0.55rem;
        font-size: 0.84rem;
    }

    .cart-summary-bar {
        gap: 0.75rem;
    }

    .cart-summary-bar strong {
        font-size: 0.98rem;
    }

    .cart-actions-row {
        gap: 0.65rem;
    }

    .cart-actions-row .btn,
    .cart-summary-bar .btn,
    .cart-summary-bar a {
        min-height: 2.5rem;
        padding: 0.58rem 0.8rem;
        font-size: 0.84rem;
    }

    .cart-empty-state {
        padding: 24px 18px;
        font-size: 0.92rem;
        line-height: 1.5;
    }

    .page-header {
        align-items: flex-start;
    }

    .login-shell-modern {
        gap: 0.75rem;
    }

    .login-hero-top {
        font-size: clamp(1.3rem, 5vw, 2.2rem);
    }

    .login-hero h1 {
        font-size: clamp(0.9rem, 2.6vw, 1.2rem);
        letter-spacing: 0.08em;
    }

    .login-hero-text {
        width: min(100%, 420px);
        font-size: 0.82rem;
    }

    .login-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .login-card-modern {
        width: min(100%, 560px);
        margin: 0 auto;
    }

    .login-card-header {
        padding: 12px 14px;
    }

    .auth-form-modern input {
        padding: 13px 15px;
    }

    .create-account-page {
        padding: 12px 18px 14px;
    }

    .create-account-page .login-shell-modern {
        width: min(920px, 100%);
        gap: 9px;
    }

    .create-account-page .login-stage {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .create-account-info-column {
        gap: 9px;
    }

    .create-account-page .login-brand-panel,
    .create-account-page .login-card-modern {
        padding: 9px;
    }

    .create-account-page .login-hero-top {
        font-size: clamp(1.35rem, 4vw, 1.8rem);
    }

    .create-account-page .login-hero h1 {
        font-size: 0.9rem;
    }

    .create-account-page .login-hero-text,
    .create-account-page .login-brand-description,
    .create-account-page .login-help-box p {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .create-account-page .login-brand-copy h2 {
        font-size: 1.08rem;
    }

    .create-account-page .login-brand-feature {
        padding: 8px 9px;
    }

    .create-account-page .login-brand-feature h3 {
        font-size: 0.78rem;
    }

    .create-account-page .login-brand-feature p {
        font-size: 0.67rem;
    }

    .create-account-page .login-card-header {
        padding: 7px 8px;
    }

    .create-account-page .login-card-header h2 {
        font-size: 1.04rem;
    }

    .create-account-page .auth-form-modern label {
        font-size: 0.78rem;
    }

    .create-account-page .auth-form-modern input {
        margin: 0 0 7px;
        padding: 8px 11px;
        font-size: 0.78rem;
    }

    .create-account-page .login-actions .btn {
        min-height: 36px;
        font-size: 0.76rem;
    }
}

@media (max-width: 720px) {
    .login-page-modern::before {
        width: 240px;
        height: 240px;
        top: -70px;
        left: -70px;
    }

    .login-page-modern::after {
        width: 220px;
        height: 220px;
        right: -60px;
        bottom: -70px;
    }

    .login-hero-tag {
        padding: 6px 12px;
        font-size: 0.66rem;
        letter-spacing: 0.12em;
    }

    .login-hero-divider {
        gap: 10px;
        margin-bottom: 8px;
    }

    .login-hero-divider strong {
        font-size: 1rem;
    }

    .login-brand-panel {
        min-height: auto;
        border-radius: 22px;
    }

    .login-product-reel-card {
        width: 210px;
        height: 154px;
        border-radius: 14px;
    }

    .login-card-modern {
        padding: 0.8125rem;
        border-radius: 18px;
    }

    .login-card-header {
        grid-template-columns: 58px 1fr;
        gap: 10px;
        border-radius: 16px;
    }

    .login-card-header-badge {
        min-width: 58px;
        min-height: 58px;
        border-radius: 16px;
        font-size: 0.6rem;
        padding: 8px;
    }

    .login-card-kicker {
        letter-spacing: 0.14em;
    }

    .login-help-box {
        padding: 0.75rem;
    }
}

@media (max-width: 640px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
        z-index: 1100;
        padding: 0.95rem;
        border-radius: 22px;
        box-shadow: 0 22px 50px rgba(7, 19, 38, 0.34);
        transform: translateY(-1rem);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-mobile-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .sidebar-mobile-head .sidebar-brand {
        padding-right: 0.5rem;
    }

    .sidebar > .sidebar-brand {
        display: none;
    }

    .sidebar-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.5rem;
        border: 0;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.09);
        color: #ffffff;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1050;
        border: 0;
        background: rgba(7, 17, 34, 0.36);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar-toggle-btn {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.28rem;
        width: 2.9rem;
        min-width: 2.9rem;
        height: 2.9rem;
        padding: 0.7rem;
        border: 1px solid var(--primary);
        border-radius: 14px;
        background: var(--primary);
        box-shadow: 0 14px 28px rgba(20, 93, 160, 0.24);
        cursor: pointer;
    }

    .sidebar-toggle-btn span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition: transform 0.28s ease, opacity 0.28s ease;
    }

    body.sidebar-open .sidebar-toggle-btn span:nth-child(1) {
        transform: translateY(0.4rem) rotate(45deg);
    }

    body.sidebar-open .sidebar-toggle-btn span:nth-child(2) {
        opacity: 0;
    }

    body.sidebar-open .sidebar-toggle-btn span:nth-child(3) {
        transform: translateY(-0.4rem) rotate(-45deg);
    }

    body.sidebar-open .sidebar-toggle-btn {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    body.login-account-page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
    }

    .login-account-page {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: visible;
    }

    .sidebar {
        padding: 16px;
    }

    .orders-showcase {
        padding: 14px 16px;
        border-radius: 22px;
    }

    .order-story-top,
    .order-story-footer {
        flex-direction: row;
        align-items: center;
        gap: 0.55rem;
    }

    .orders-showcase-hero {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
    }

    .orders-showcase-orbit {
        width: 92px;
        height: 92px;
    }

    .orders-summary-grid {
        grid-template-columns: 1fr;
    }

    .order-story-card {
        grid-template-columns: 1fr;
    }

    .order-story-panel {
        padding: 14px 14px 14px 16px;
        border-radius: 20px;
    }

    .order-story-label {
        font-size: 0.56rem;
        letter-spacing: 0.14em;
    }

    .order-story-top h3 {
        font-size: 1.02rem;
        line-height: 1.02;
    }

    .order-story-grid {
        gap: 0.55rem;
        margin: 10px 0;
    }

    .order-story-detail {
        padding: 9px 10px;
        border-radius: 14px;
    }

    .order-story-detail span {
        font-size: 0.62rem;
    }

    .order-story-detail strong,
    .order-story-note,
    .order-story-action {
        font-size: 0.76rem;
    }

    .order-story-rail {
        display: none;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-top: 14px;
    }

    .sidebar-nav a {
        padding: 11px 12px;
    }

    .sidebar-nav:not(.retail-nav):not(.store-nav) {
        gap: 12px;
        margin-top: 16px;
    }

    .sidebar-nav:not(.retail-nav):not(.store-nav) a {
        min-height: 3.5rem;
        padding: 0.95rem 1rem;
        border-radius: 16px;
        font-size: 1rem;
    }

    .sidebar-nav.retail-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .sidebar-nav.retail-nav .nav-dashboard {
        grid-column: 1;
        grid-row: 1;
    }

    .sidebar-nav.retail-nav .nav-cart {
        grid-column: 1;
        grid-row: 2;
    }

    .sidebar-nav.retail-nav .nav-orders {
        grid-column: 2;
        grid-row: 1;
    }

    .sidebar-nav.retail-nav .nav-logout {
        grid-column: 2;
        grid-row: 2;
    }

    .sidebar-nav.retail-nav a {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .sidebar-nav.retail-nav .nav-pill {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .main-content {
        padding: 4.5rem 10px 10px;
    }

    .grid-cards {
        gap: 0.55rem;
    }

    .product-card {
        border-radius: 18px;
    }

    .product-body {
        padding: 0.7rem;
    }

    .content-card,
    .stat-card,
    .product-card,
    .stack-form,
    .auth-form,
    .demo-box {
        padding: 16px;
    }

    .filter-form {
        width: 100%;
    }

    .filter-form input,
    .filter-form select,
    .filter-form .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .search-stack .btn,
    .invoice-filter-select {
        width: 100%;
        min-width: 0;
    }

    .retail-filter-bar {
        flex-direction: column;
    }

    .filter-form-search,
    .filter-form-category {
        width: 100%;
    }

    .filter-form-search {
        flex-direction: row;
        align-items: stretch;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .filter-form-search input[type="text"] {
        flex: 1 1 auto;
        min-width: 0;
    }

    .filter-form-search .btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 5.5rem;
        padding-inline: 0.75rem;
        white-space: nowrap;
    }

    .login-shell-modern {
        gap: 0.625rem;
    }

    .login-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .login-brand-panel,
    .login-card-modern {
        padding: 0.75rem;
    }

    .login-brand-features {
        gap: 0.5rem;
        margin-top: 0.625rem;
    }

    .login-card-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
        padding: 12px;
    }

    .login-card-header-badge {
        width: 100%;
        min-height: 52px;
    }

    .login-card-header-copy {
        text-align: center;
    }

    .auth-form-modern {
        padding: 0;
    }

    .auth-form-modern input {
        font-size: 16px;
    }

    .login-actions {
        grid-template-columns: 1fr;
    }

    .login-account-page .login-brand-feature:last-child,
    .login-account-page .login-help-box {
        display: none;
    }

    .create-account-page {
        padding: 10px 14px 12px;
    }

    .create-account-page .login-shell-modern {
        gap: 8px;
    }

    .create-account-page .login-brand-panel,
    .create-account-page .login-card-modern {
        padding: 8px;
        border-radius: 16px;
    }

    .create-account-page .login-hero-tag {
        font-size: 0.56rem;
    }

    .create-account-page .login-hero-top {
        font-size: 1.28rem;
    }

    .create-account-page .login-hero h1 {
        font-size: 0.82rem;
    }

    .create-account-page .login-hero-text,
    .create-account-page .login-brand-description,
    .create-account-page .login-help-box p {
        font-size: 0.68rem;
        line-height: 1.26;
    }

    .create-account-page .login-brand-copy h2 {
        font-size: 0.98rem;
    }

    .create-account-page .login-brand-features {
        gap: 6px;
        margin-top: 8px;
    }

    .create-account-page .login-brand-feature {
        padding: 7px 8px;
    }

    .create-account-page .login-brand-feature-number {
        width: 32px;
        height: 32px;
        font-size: 0.62rem;
    }

    .create-account-page .login-brand-feature h3 {
        font-size: 0.74rem;
    }

    .create-account-page .login-brand-feature p {
        font-size: 0.64rem;
    }

    .create-account-page .login-card-header {
        gap: 10px;
        padding: 8px;
    }

    .create-account-page .login-card-header-badge {
        min-width: 46px;
        min-height: 46px;
        font-size: 0.46rem;
    }

    .create-account-page .login-card-header h2 {
        font-size: 0.96rem;
    }

    .create-account-page .auth-form-modern label {
        font-size: 0.74rem;
    }

    .create-account-page .auth-form-modern input {
        margin: 0 0 6px;
        padding: 8px 10px;
        font-size: 0.74rem;
    }

    .create-account-page .login-actions {
        gap: 6px;
    }

    .create-account-page .login-actions .btn {
        min-height: 34px;
        font-size: 0.72rem;
    }

    .create-account-page .login-help-box h3 {
        font-size: 0.82rem;
    }

    .page-header,
    .toolbar,
    .summary-bar,
    .actions-row,
    .invoice-header,
    .invoice-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header {
        position: relative;
        min-height: 3.1rem;
        gap: 8px;
        padding-right: 4.35rem;
    }

    .page-header > div:first-child {
        padding: 0;
        max-width: calc(100% - 4.35rem);
    }

    .sidebar-toggle-btn {
        position: fixed;
        top: 0.75rem;
        right: 0.75rem;
        margin: 0;
        z-index: 1200;
    }

    .page-header .eyebrow {
        margin-bottom: 4px;
        font-size: 0.6rem;
        letter-spacing: 0.1em;
    }

    .page-header h1 {
        margin: 0;
        font-size: 1.28rem;
        line-height: 1.08;
    }

    .summary-bar strong,
    .user-chip {
        width: 100%;
    }

    .user-chip {
        max-width: calc(100% - 4.35rem);
        padding: 0.45rem 0.65rem;
        border-radius: 10px;
        font-size: 0.76rem;
        line-height: 1.25;
    }

    .actions-row .btn,
    .summary-bar .btn,
    .summary-bar a,
    .order-action-buttons .btn {
        width: 100%;
    }

    .order-action-box,
    .product-name-cell {
        min-width: 0;
    }

    .product-meta,
    .order-action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .table th,
    .table td {
        padding: 12px 10px;
    }

    .table-thumb {
        width: 52px;
        height: 52px;
    }

    .product-gallery-dialog {
        width: min(100%, calc(100% - 0.75rem));
        max-height: calc(100dvh - 0.75rem);
        margin: 0.375rem auto;
        padding: 0.75rem;
        border-radius: 20px;
    }

    .product-gallery-close {
        margin-bottom: 0.6rem;
        padding: 0.48rem 0.75rem;
        font-size: 0.72rem;
    }

    .product-gallery-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
        margin-top: 0.7rem;
    }

    .product-gallery-kicker {
        font-size: 0.62rem;
        letter-spacing: 0.11em;
    }

    .product-gallery-copy h2 {
        font-size: 1.28rem;
    }

    .product-gallery-description {
        font-size: 0.82rem;
        line-height: 1.45;
    }

    .product-gallery-info-grid {
        gap: 0.65rem;
    }

    .product-gallery-info-card {
        padding: 0.72rem 0.8rem;
        border-radius: 16px;
    }

    .product-gallery-info-card span {
        font-size: 0.64rem;
    }

    .product-gallery-info-card strong {
        font-size: 0.84rem;
    }

    .role-store .page-header {
        gap: 6px;
    }

    .role-store .page-header .eyebrow {
        margin-bottom: 3px;
        font-size: 0.54rem;
        letter-spacing: 0.08em;
    }

    .role-store .page-header h1 {
        font-size: 1.08rem;
        line-height: 1.02;
    }

    .role-store .user-chip {
        padding: 0.34rem 0.5rem;
        font-size: 0.66rem;
        line-height: 1.15;
        border-radius: 9px;
    }

    .store-orders-page {
        padding: 12px;
        border-radius: 18px;
    }

    .store-orders-table {
        min-width: 28rem;
    }

    .store-orders-table th,
    .store-orders-table td {
        padding: 8px 7px;
        font-size: 0.7rem;
        line-height: 1.22;
    }

    .store-orders-table th {
        font-size: 0.62rem;
    }

    .store-orders-page .status-badge {
        padding: 3px 19px;
        font-size: 0.50rem;
    }

    .store-orders-page .status-ready {
        padding: 5px 15px;
        font-size: 0.80rem;
        margin-top: 0px;
    }

    .store-order-form select {
        padding: 0.38rem 0.46rem;
        font-size: 0.66rem;
    }

    .store-orders-page .order-action-buttons {
        gap: 0.4rem;
        margin-top: 6px;
    }

    .store-orders-page .order-action-buttons .btn {
        min-height: 1.95rem;
        padding: 0.38rem 0.5rem;
        font-size: 0.64rem;
    }

    .cart-page {
        padding: 14px;
        border-radius: 18px;
    }

    .cart-table {
        min-width: 29rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 9px 8px;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .cart-table th {
        font-size: 0.72rem;
        letter-spacing: 0.01em;
    }

    .cart-page .table-thumb {
        width: 44px;
        height: 44px;
        border-radius: 9px;
    }

    .cart-page .table td input[type="number"] {
        width: 4rem;
        padding: 0.42rem 0.48rem;
        font-size: 0.76rem;
    }

    .cart-summary-bar {
        gap: 0.65rem;
        margin-top: 14px;
    }

    .cart-summary-bar strong {
        font-size: 0.88rem;
    }

    .cart-actions-row {
        gap: 0.55rem;
    }

    .cart-actions-row .btn,
    .cart-summary-bar .btn,
    .cart-summary-bar a {
        min-height: 2.3rem;
        padding: 0.5rem 0.7rem;
        font-size: 0.76rem;
    }

    .cart-empty-state {
        padding: 20px 14px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .cart-page-modern {
        padding: 0.95rem;
        border-radius: 22px;
    }

    .cart-hero {
        margin-bottom: 0.95rem;
    }

    .cart-hero h1 {
        font-size: 1.65rem;
    }

    .cart-hero-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .cart-table-wrap {
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
    }

    .cart-table,
    .cart-table thead,
    .cart-table tbody,
    .cart-table tr,
    .cart-table th,
    .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table {
        min-width: 0;
        border-collapse: separate;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody {
        display: grid;
        gap: 0;
    }

    .cart-item-row {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        grid-template-areas:
            "image product"
            "image price"
            "image qty";
        gap: 0.35rem 1rem;
        padding: 1rem 0.1rem;
        border: 0;
        border-bottom: 1px solid #d8e5f3;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .cart-item-row td {
        padding: 0;
        border: 0;
        min-width: 0;
    }

    .cart-col-image {
        grid-area: image;
        align-self: start;
        padding-top: 0.05rem;
    }

    .cart-col-product {
        grid-area: product;
        align-self: start;
        padding-top: 0.2rem;
    }

    .cart-col-price {
        grid-area: price;
        font-size: 1rem;
        font-weight: 800;
        color: var(--primary);
    }

    .cart-col-qty {
        grid-area: qty;
        display: block;
    }

    .cart-col-subtotal {
        display: none;
    }

    .cart-col-action {
        display: contents;
    }

    .cart-product-name {
        font-size: 1.12rem;
        line-height: 1.22;
        font-weight: 800;
    }

    .cart-thumb {
        width: 104px;
        height: 104px;
        border-radius: 18px;
    }

    .cart-qty-control {
        width: 100%;
        align-items: stretch;
    }

    .cart-qty-btn {
        width: 2.5rem;
        min-width: 2.5rem;
        height: 2.6rem;
        font-size: 1.05rem;
    }

    .cart-page .cart-qty-control input[type="number"] {
        width: 3rem;
        min-width: 3rem;
        height: 2.6rem;
        min-height: 2.6rem;
        padding: 0.45rem;
        font-size: 1rem;
        background: #ffffff;
    }

    .cart-remove-btn {
        width: auto;
        min-width: 6rem;
        min-height: 2.6rem;
        padding: 0.5rem 0.85rem;
        font-size: 0.82rem;
        border-radius: 0 12px 12px 0;
        white-space: nowrap;
    }

    .cart-summary-model {
        gap: 0.8rem;
        padding: 1.15rem 1rem 1rem;
        border-radius: 20px;
    }

    .cart-summary-line {
        font-size: 0.96rem;
    }

    .cart-summary-line-total {
        padding-top: 0.9rem;
    }

    .cart-summary-line-total .cart-summary-key,
    .cart-summary-line-total .cart-summary-value {
        font-size: 1.15rem;
    }

    .cart-actions-row {
        margin-top: 0.3rem;
    }

    .cart-checkout-btn {
        min-height: 3.2rem;
        border-radius: 15px;
        font-size: 0.96rem;
    }
}

@media (max-width: 520px) {
    .chat-layout-card {
        padding: 12px;
    }

    .chat-contact-card {
        padding: 12px;
    }

    .chat-bubble {
        width: min(72%, 100%);
        max-width: 72%;
        padding: 12px 13px;
    }

    .chat-bubble:not(.is-own) {
        margin-right: auto;
    }

    .chat-compose-form textarea {
        min-height: 104px;
        font-size: 0.84rem;
    }

    .invoice-card {
        margin-bottom: 16px;
    }

    .invoice-header {
        gap: 0.55rem;
    }

    .invoice-header h2 {
        margin: 0;
        font-size: 0.96rem;
        line-height: 1.08;
    }

    .invoice-header p,
    .invoice-grid p,
    .invoice-total strong {
        font-size: 0.72rem;
        line-height: 1.32;
    }

    .invoice-grid {
        gap: 0.55rem;
    }

    .invoice-grid strong {
        font-size: 0.72rem;
    }

    .invoice-header .btn,
    .invoice-card .btn {
        min-height: 2.1rem;
        padding: 0.42rem 0.62rem;
        font-size: 0.68rem;
    }

    .invoice-card .status-badge {
        padding: 6px 10px;
        font-size: 0.52rem;
    }

    .login-product-reel-card {
        width: 166px;
        height: 124px;
    }

    .order-story-top,
    .order-story-footer {
        gap: 0.45rem;
    }

    .order-story-panel {
        padding: 12px 12px 12px 14px;
        border-radius: 18px;
    }

    .order-story-label {
        font-size: 0.52rem;
    }

    .order-story-top h3 {
        font-size: 0.92rem;
    }

    .order-story-detail {
        padding: 8px 9px;
    }

    .order-story-detail span {
        font-size: 0.58rem;
    }

    .order-story-detail strong,
    .order-story-note,
    .order-story-action {
        font-size: 0.7rem;
    }

    .orders-showcase {
        padding: 12px 14px;
        border-radius: 18px;
    }

    .orders-showcase-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 12px;
    }

    .orders-showcase-copy {
        max-width: none;
        flex: 1 1 auto;
        min-width: 0;
    }

    .orders-showcase-kicker {
        font-size: 0.58rem;
        margin-bottom: 4px;
    }

    .orders-showcase h2 {
        font-size: 1rem;
        line-height: 1.04;
    }

    .orders-showcase-text {
        margin-top: 4px;
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .orders-showcase-orbit {
        width: 74px;
        height: 74px;
        flex-basis: 74px;
        flex-shrink: 0;
    }

    .office-day-closing-layout {
        gap: 14px;
    }

    .office-day-invoice-table,
    .office-day-report-table {
        min-width: 30rem;
    }

    .office-subsection-head h3 {
        font-size: 0.92rem;
    }

    .office-subsection-head p,
    .office-row-status {
        font-size: 0.76rem;
    }

    .office-admin-form-card {
        margin-bottom: 18px;
    }

    .office-admin-card-head {
        gap: 12px;
        margin-bottom: 14px;
    }

    .office-admin-card-head h2 {
        font-size: 1rem;
        line-height: 1.15;
    }

    .office-admin-card-head p {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .office-admin-form {
        gap: 12px;
    }

    .office-admin-form label {
        gap: 6px;
        font-size: 0.82rem;
    }

    .office-admin-form input,
    .office-admin-form select {
        padding: 10px 11px;
        border-radius: 12px;
        font-size: 0.84rem;
    }

    .office-admin-form-actions .btn,
    .office-admin-card-head .btn {
        min-height: 2.6rem;
        font-size: 0.82rem;
    }

    .office-day-invoice-list .table th,
    .office-day-invoice-list .table td,
    .office-day-report-table th,
    .office-day-report-table td {
        padding: 8px 7px;
        font-size: 0.7rem;
    }

    .office-day-invoice-list .table th,
    .office-day-report-table th {
        font-size: 0.62rem;
    }

    .office-row-status {
        margin-left: 6px;
        padding: 3px 7px;
    }

    .office-stock-card {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .office-stock-image {
        width: 52px;
        height: 52px;
    }

    .office-stock-copy h3 {
        font-size: 0.9rem;
    }

    .office-stock-copy p,
    .office-stock-copy strong,
    .office-stock-label {
        font-size: 0.78rem;
    }

    .office-bill-preview {
        padding: 12px;
        border-radius: 14px;
    }

    .office-bill-preview strong {
        font-size: 0.88rem;
    }

    .office-bill-preview p {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .office-scroll-box {
        max-height: 320px;
    }

    .main-content {
        padding: 8px;
    }

    .grid-cards {
        gap: 0.45rem;
    }

    .order-story-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .content-card,
    .stat-card,
    .stack-form,
    .auth-form,
    .demo-box {
        padding: 14px;
    }

    .product-body {
        padding: 0.65rem;
    }

    .table {
        min-width: 600px;
    }

    .table-wrap {
        margin-inline: -4px;
        padding-inline: 4px;
    }

    .page-header .eyebrow {
        font-size: 0.52rem;
        letter-spacing: 0.1em;
    }

    .page-header h1 {
        font-size: 1.02rem;
        line-height: 1.05;
    }

    .user-chip {
        padding: 0.38rem 0.55rem;
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .role-store .page-header .eyebrow {
        font-size: 0.5rem;
    }

    .role-store .page-header h1 {
        font-size: 0.96rem;
    }

    .role-store .user-chip {
        padding: 0.3rem 0.46rem;
        font-size: 0.6rem;
        line-height: 1.1;
    }

    .store-orders-page {
        padding: 10px;
    }

    .store-orders-table {
        min-width: 25.5rem;
    }

    .store-orders-table th,
    .store-orders-table td {
        padding: 7px 6px;
        font-size: 0.64rem;
    }

    .store-orders-table th {
        font-size: 0.58rem;
    }

    .store-orders-page .status-badge {
        padding: 7px 15px;
        font-size: 0.45rem;
    }

    .store-orders-page .status-ready {
        padding: 8px 18px;
        font-size: 0.4rem;
    }

    .store-order-form select {
        padding: 0.34rem 0.4rem;
        font-size: 0.62rem;
    }

    .store-orders-page .order-action-buttons .btn {
        min-height: 1.8rem;
        font-size: 0.6rem;
    }

    .cart-page {
        padding: 12px;
    }

    .cart-table {
        min-width: 26.5rem;
    }

    .cart-table th,
    .cart-table td {
        padding: 8px 7px;
        font-size: 0.67rem;
        line-height: 1.3;
    }

    .cart-table th {
        font-size: 0.62rem;
    }

    .cart-page .table-thumb {
        width: 40px;
        height: 40px;
    }

    .cart-page .table td input[type="number"] {
        width: 3.6rem;
        padding: 0.38rem 0.42rem;
        font-size: 0.66rem;
    }

    .cart-summary-bar strong {
        font-size: 0.76rem;
    }

    .cart-actions-row .btn,
    .cart-summary-bar .btn,
    .cart-summary-bar a {
        min-height: 2.15rem;
        padding: 0.46rem 0.62rem;
        font-size: 0.66rem;
    }

    .cart-empty-state {
        font-size: 0.76rem;
        line-height: 1.4;
    }
}

@media (max-width: 420px) {
    .page-header .eyebrow {
        font-size: 0.46rem;
    }

    .page-header h1 {
        font-size: 0.84rem;
        line-height: 1.02;
    }

    .user-chip {
        padding: 0.26rem 0.38rem;
        font-size: 0.54rem;
        line-height: 1.08;
    }

    .invoice-header h2 {
        font-size: 0.86rem;
    }

    .invoice-header p,
    .invoice-grid p,
    .invoice-total strong {
        font-size: 0.66rem;
        line-height: 1.26;
    }

    .invoice-header .btn,
    .invoice-card .btn {
        min-height: 1.95rem;
        font-size: 0.62rem;
    }

    .invoice-card .status-badge {
        padding: 5px 9px;
        font-size: 0.46rem;
    }

    .login-product-reel-card {
        width: 154px;
        height: 114px;
    }

    .order-story-top,
    .order-story-footer {
        gap: 0.35rem;
    }

    .order-story-panel {
        padding: 10px 10px 10px 12px;
        border-radius: 16px;
    }

    .order-story-label {
        font-size: 0.48rem;
        letter-spacing: 0.12em;
    }

    .order-story-top h3 {
        font-size: 0.84rem;
    }

    .order-story-detail {
        padding: 7px 8px;
        border-radius: 12px;
    }

    .order-story-detail span {
        font-size: 0.54rem;
    }

    .order-story-detail strong,
    .order-story-note,
    .order-story-action {
        font-size: 0.64rem;
        line-height: 1.2;
    }

    .orders-showcase {
        padding: 8px 10px;
        border-radius: 16px;
    }

    .orders-showcase-hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
    }

    .orders-showcase-kicker {
        font-size: 0.48rem;
        margin-bottom: 3px;
    }

    .orders-showcase h2 {
        font-size: 0.82rem;
        line-height: 1.02;
    }

    .orders-showcase-text {
        margin-top: 3px;
        font-size: 0.6rem;
        line-height: 1.16;
    }

    .orders-showcase-orbit {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
        flex-shrink: 0;
    }

    .office-day-invoice-table,
    .office-day-report-table {
        min-width: 27rem;
    }

    .office-subsection-head h3 {
        font-size: 0.86rem;
    }

    .office-subsection-head p,
    .office-row-status {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .office-admin-card-head h2 {
        font-size: 0.92rem;
    }

    .office-admin-card-head p,
    .office-bill-preview p,
    .office-stock-copy p,
    .office-stock-copy strong,
    .office-stock-label {
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .office-admin-form label {
        font-size: 0.76rem;
    }

    .office-admin-form input,
    .office-admin-form select {
        padding: 9px 10px;
        font-size: 0.78rem;
    }

    .office-day-invoice-list .table th,
    .office-day-invoice-list .table td,
    .office-day-report-table th,
    .office-day-report-table td {
        padding: 7px 6px;
        font-size: 0.64rem;
        line-height: 1.25;
    }

    .office-day-invoice-list .table th,
    .office-day-report-table th {
        font-size: 0.56rem;
    }

    .office-admin-form-actions .btn,
    .office-admin-card-head .btn {
        min-height: 2.35rem;
        font-size: 0.76rem;
        padding: 0.5rem 0.65rem;
    }

    .office-stock-card {
        padding: 10px;
        gap: 10px;
    }

    .office-stock-image {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .office-stock-copy h3 {
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .office-scroll-box {
        max-height: 280px;
    }

    body.login-account-page {
        height: auto;
        overflow-y: auto;
    }

    .login-account-page {
        height: auto;
        overflow-y: visible;
    }

    .login-page {
        padding: 0.75rem;
    }

    .login-shell-modern {
        gap: 0.625rem;
    }

    .login-hero-tag {
        width: 100%;
        padding-inline: 12px;
    }

    .login-hero-top {
        font-size: clamp(1.2rem, 8vw, 1.9rem);
    }

    .login-hero h1 {
        font-size: 0.82rem;
        letter-spacing: 0.08em;
    }

    .login-hero-text {
        font-size: 0.76rem;
    }

    .login-brand-panel,
    .login-card-modern {
        padding: 0.6875rem;
        border-radius: 18px;
    }

    .login-brand-feature {
        padding: 0.625rem;
    }

    .login-brand-feature h3 {
        font-size: 0.88rem;
    }

    .login-brand-feature p {
        font-size: 0.76rem;
    }

    .login-card-header {
        border-radius: 16px;
    }

    .login-card-header h2 {
        font-size: 1.35rem;
    }

    .login-card-header p,
    .login-help-box p {
        font-size: 0.82rem;
    }

    .login-account-page .login-brand-description,
    .login-account-page .login-brand-feature p,
    .login-account-page .login-card-header p {
        font-size: 0.74rem;
        line-height: 1.3;
    }

    .create-account-page {
        padding: 8px 10px 10px;
    }

    .create-account-page .login-hero-tag {
        font-size: 0.52rem;
    }

    .create-account-page .login-hero-top {
        font-size: 1.12rem;
    }

    .create-account-page .login-hero h1 {
        font-size: 0.76rem;
    }

    .create-account-page .login-hero-text,
    .create-account-page .login-brand-description,
    .create-account-page .login-help-box p {
        font-size: 0.64rem;
        line-height: 1.22;
    }

    .create-account-page .login-brand-panel,
    .create-account-page .login-card-modern {
        padding: 7px;
        border-radius: 14px;
    }

    .create-account-page .login-brand-copy h2 {
        font-size: 0.9rem;
    }

    .create-account-page .login-brand-feature {
        gap: 8px;
        padding: 6px 7px;
    }

    .create-account-page .login-brand-feature h3 {
        font-size: 0.7rem;
    }

    .create-account-page .login-brand-feature p {
        font-size: 0.6rem;
    }

    .create-account-page .login-card-header {
        padding: 7px;
    }

    .create-account-page .login-card-header h2 {
        font-size: 0.9rem;
    }

    .create-account-page .auth-form-modern label {
        font-size: 0.7rem;
    }

    .create-account-page .auth-form-modern input {
        padding: 7px 9px;
        font-size: 0.7rem;
    }

    .create-account-page .login-actions .btn {
        min-height: 32px;
        font-size: 0.68rem;
    }

    .login-actions .btn {
        min-height: 50px;
    }

    .sidebar {
        padding: 14px 12px;
    }

    .page-header .eyebrow {
        font-size: 0.48rem;
    }

    .page-header h1 {
        font-size: 0.94rem;
    }

    .user-chip {
        padding: 0.34rem 0.5rem;
        font-size: 0.62rem;
        line-height: 1.15;
    }

    .role-store .page-header .eyebrow {
        font-size: 0.46rem;
    }

    .role-store .page-header h1 {
        font-size: 0.88rem;
    }

    .role-store .user-chip {
        padding: 0.28rem 0.4rem;
        font-size: 0.56rem;
        line-height: 1.05;
    }

    .main-content {
        padding: 6px;
    }

    .grid-cards {
        gap: 0.35rem;
    }

    .content-card,
    .stat-card,
    .stack-form,
    .auth-form,
    .demo-box {
        padding: 12px;
    }

    .product-body {
        padding: 0.58rem;
    }

    .table-thumb {
        width: 46px;
        height: 46px;
        border-radius: 10px;
    }

    .product-gallery-dialog {
        width: min(100%, calc(100% - 0.5rem));
        max-height: calc(100dvh - 0.5rem);
        padding: 0.625rem;
        border-radius: 18px;
    }

    .product-gallery-layout {
        gap: 0.75rem;
    }

    .product-gallery-copy {
        padding-bottom: 0.5rem;
    }

    .product-gallery-copy h2 {
        font-size: 1.08rem;
    }

    .product-gallery-description {
        font-size: 0.76rem;
    }

    .product-gallery-info-grid {
        grid-template-columns: 1fr;
    }

    .product-gallery-info-card {
        padding: 0.65rem 0.72rem;
    }

    .product-gallery-info-card span {
        font-size: 0.58rem;
    }

    .product-gallery-info-card strong {
        font-size: 0.76rem;
    }

    .store-orders-table th,
    .store-orders-table td {
        font-size: 0.6rem;
    }

    .store-orders-table th {
        font-size: 0.54rem;
    }

    .store-order-form select,
    .store-orders-page .order-action-buttons .btn {
        font-size: 0.48rem;
    }

    .store-orders-page .status-badge {
        padding: 7px 15px;
        font-size: 0.43rem;
    }

    .store-orders-page .status-ready {
        padding: 3px 10px;
        font-size: 0.80rem;
    }

    .cart-table th,
    .cart-table td {
        font-size: 0.63rem;
    }

    .cart-table th {
        font-size: 0.58rem;
    }

    .cart-page .table td input[type="number"] {
        font-size: 0.62rem;
    }

    .cart-summary-bar strong {
        font-size: 0.72rem;
    }

    .cart-actions-row .btn,
    .cart-summary-bar .btn,
    .cart-summary-bar a,
    .cart-empty-state {
        font-size: 0.62rem;
    }
}

@media (max-height: 760px) {
    .login-page {
        padding-block: 0.75rem;
    }

    .login-shell-modern {
        gap: 0.625rem;
    }

    .login-hero-text {
        margin-top: 0.375rem;
    }

    .login-brand-panel,
    .login-card-modern {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .login-product-reel-block {
        margin-top: 0.625rem;
    }

    .login-product-reel-shell {
        padding: 0.25rem 0;
    }

    .login-product-reel-track {
        gap: 0.625rem;
    }

    .login-product-reel-card {
        width: 178px;
        height: 132px;
        padding: 0.35rem;
    }

    .login-card-header p,
    .login-help-box p {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .auth-form-modern input {
        margin-bottom: 0.75rem;
        padding: 0.75rem 0.875rem;
    }

    .login-actions .btn {
        min-height: 2.875rem;
    }

    .login-account-page .login-help-box {
        display: none;
    }
}

@media (max-width: 991px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-thread {
        max-height: 420px;
    }

    .office-day-closing-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .office-day-invoice-table,
    .office-day-report-table {
        min-width: 38rem;
    }

    .office-admin-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .office-admin-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .office-admin-card-head .btn {
        width: 100%;
        justify-content: center;
    }

    .office-admin-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .office-admin-form-actions {
        grid-column: 1 / -1;
    }

    .office-admin-form-actions .btn {
        width: 100%;
    }

    .office-stock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .office-scroll-box {
        max-height: 380px;
    }

    .office-admin-grid {
        margin-bottom: 18px;
    }
}

@media (max-width: 767px) {
    .office-subsection-head h3 {
        font-size: 1rem;
    }

    .office-subsection-head p {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .office-admin-form {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .office-day-invoice-table,
    .office-day-report-table {
        min-width: 34rem;
    }

    .office-day-invoice-list .table th,
    .office-day-invoice-list .table td,
    .office-day-report-table th,
    .office-day-report-table td {
        padding: 10px 9px;
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .office-day-invoice-list .table th,
    .office-day-report-table th {
        font-size: 0.68rem;
    }

    .office-scroll-box {
        max-height: 360px;
    }

    .office-stock-card {
        align-items: flex-start;
        padding: 14px;
    }

    .office-stock-grid {
        grid-template-columns: 1fr;
    }

    .office-stock-copy h3 {
        font-size: 0.98rem;
        line-height: 1.25;
    }

    .office-stock-copy p,
    .office-stock-copy strong,
    .office-stock-label,
    .office-bill-preview p {
        font-size: 0.84rem;
    }

    .office-admin-form input,
    .office-admin-form select {
        padding: 11px 12px;
        font-size: 0.92rem;
    }

    .office-admin-card-head h2 {
        font-size: 1.08rem;
    }

    .office-admin-card-head p {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .office-bill-preview {
        padding: 14px;
    }

    .office-admin-form-card,
    .office-admin-grid,
    .content-card {
        scroll-margin-top: 12px;
    }
}

@media (max-height: 680px) {
    .login-account-page .login-brand-description,
    .login-account-page .login-brand-feature:nth-child(2) p,
    .login-account-page .login-brand-feature:nth-child(3) {
        display: none;
    }
}
