:root {
    --bg: #f4efe7;
    --bg-alt: #faf7f1;
    --panel: rgba(255, 251, 245, 0.92);
    --panel-strong: #fffdf8;
    --dashboard-surface: #ffffff;
    --sidebar-top: #1c2e3e;
    --sidebar-bottom: #32505f;
    --accent: #c96f1d;
    --accent-strong: #8c4512;
    --accent-soft: #f7d3b1;
    --ink: #1f2330;
    --muted: #667184;
    --border: rgba(31, 35, 48, 0.08);
    --success: #1f7a57;
    --warning: #ba7a18;
    --danger: #b23a31;
    --shadow: 0 18px 38px rgba(41, 32, 18, 0.08);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --shell-space: 24px;
    --shell-gap: 24px;
    --sidebar-width: 280px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100dvh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "Aptos", "Trebuchet MS", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(201, 111, 29, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(50, 80, 95, 0.1), transparent 24%),
        linear-gradient(180deg, var(--bg), var(--bg-alt));
}

body.is-mobile-nav-open {
    overflow: hidden;
}

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

h1,
h2,
h3,
strong {
    font-family: Georgia, "Times New Roman", serif;
}

p {
    margin: 0;
}

.mobile-topbar,
.mobile-nav-backdrop,
.sidebar-close {
    display: none;
}

.shell {
    display: grid;
    grid-template-columns: minmax(220px, var(--sidebar-width)) minmax(0, 1fr);
    gap: var(--shell-gap);
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    padding: var(--shell-space);
    align-items: start;
}

.shell > * {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: var(--shell-space);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 20px;
    min-height: calc(100dvh - (var(--shell-space) * 2));
    max-height: calc(100dvh - (var(--shell-space) * 2));
    width: 100%;
    max-width: 100%;
    padding: 28px;
    color: #f7f2ea;
    background: linear-gradient(180deg, var(--sidebar-top), var(--sidebar-bottom));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand h1 {
    margin: 0;
    font-size: 1.7rem;
}

.eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-weight: 700;
}

.brand-mark.has-image,
.mobile-topbar-mark.has-image {
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
}

.brand-mark img,
.mobile-topbar-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 520px;
}

.auth-card {
    display: grid;
    gap: 24px;
    padding: 28px;
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.auth-brand {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.auth-brand h1,
.auth-content h2 {
    margin: 0;
}

.auth-content,
.auth-copy-block {
    display: grid;
    gap: 14px;
}

.auth-copy {
    color: var(--muted);
    line-height: 1.65;
}

.auth-form {
    max-width: none;
}

.auth-note {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.nav {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(247, 242, 234, 0.34) transparent;
}

.nav::-webkit-scrollbar {
    width: 8px;
}

.nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(247, 242, 234, 0.28);
    background-clip: content-box;
}

.nav::-webkit-scrollbar-thumb:hover {
    background: rgba(247, 242, 234, 0.42);
    background-clip: content-box;
}

.nav::-webkit-scrollbar-corner {
    background: transparent;
}

.nav-group {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: rgba(247, 242, 234, 0.86);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: transparent;
    color: rgba(247, 242, 234, 0.86);
    text-align: left;
    font: inherit;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.nav-parent-icon {
    width: 9px;
    height: 9px;
    flex: 0 0 auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 140ms ease;
}

.nav-parent:hover,
.nav-parent.is-open {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.nav-parent:focus,
.nav-parent:focus-visible,
.nav-parent:active {
    outline: none;
    box-shadow: none;
    color: rgba(247, 242, 234, 0.86);
}

.nav-parent.is-open .nav-parent-icon,
.nav-parent[aria-expanded='true'] .nav-parent-icon {
    transform: rotate(45deg);
}

.nav-submenu {
    display: none;
    gap: 8px;
    padding-left: 16px;
}

.nav-mobile-quick-actions {
    display: none;
}

.nav-group.is-open .nav-submenu {
    display: grid;
}

.nav-sublink {
    position: relative;
    padding: 10px 14px 10px 18px;
    border-radius: var(--radius-sm);
    color: rgba(247, 242, 234, 0.7);
    font-size: 0.95rem;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav-sublink::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(247, 242, 234, 0.35);
    transform: translateY(-50%);
}

.nav-sublink:hover,
.nav-sublink.is-active {
    transform: translateX(4px);
    color: #f7f2ea;
    background: rgba(255, 255, 255, 0.08);
}

.nav-sublink.is-active::before {
    background: #f2af73;
}

.sidebar-session {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-session-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-session-avatar {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-weight: 700;
}

.sidebar-session-avatar.has-image {
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-session-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-session-copy {
    display: grid;
    gap: 6px;
}

.sidebar-session-copy strong,
.sidebar-session-copy span {
    color: #f7f2ea;
}

.sidebar-session-copy span {
    font-size: 0.95rem;
    opacity: 0.76;
}

.sidebar-session-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #f7f2ea;
    transition: background 140ms ease, transform 140ms ease;
}

.sidebar-session-link:hover,
.sidebar-session-link.is-active {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.16);
}

.main {
    display: grid;
    gap: 20px;
    align-content: start;
    min-width: 0;
    max-width: 100%;
}

.hero-card,
.panel,
.metric-card,
.flash {
    min-width: 0;
    background: var(--panel);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-card {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 28px 30px;
    background:
        linear-gradient(135deg, rgba(255, 249, 240, 0.94), rgba(252, 239, 220, 0.72)),
        var(--panel);
}

.hero-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hero-copy {
    max-width: 60ch;
    line-height: 1.65;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff7ef;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 14px 24px rgba(140, 69, 18, 0.22);
}

.button-secondary {
    color: var(--accent-strong);
    background: var(--accent-soft);
}

.button-ghost {
    color: var(--muted);
    background: rgba(31, 35, 48, 0.06);
}

.button-small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.92rem;
}

.full-width {
    width: 100%;
}

.flash {
    padding: 16px 18px;
    border-radius: var(--radius-lg);
}

.flash-success {
    border-color: rgba(31, 122, 87, 0.2);
    color: var(--success);
}

.flash-error {
    border-color: rgba(178, 58, 49, 0.2);
    color: var(--danger);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.metric-card {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.metric-card strong {
    font-size: 1.8rem;
}

.dashboard-summary-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    align-items: center;
    margin-bottom: 4px;
}

.dashboard-toolbar-card {
    grid-column: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    justify-self: end;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
}

.dashboard-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 320px;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    background: var(--dashboard-surface);
    border: 1px solid rgba(31, 35, 48, 0.06);
}

.dashboard-user-chip-icon {
    justify-content: center;
    gap: 0;
    width: 46px;
    height: 46px;
    max-width: none;
    padding: 0;
}

.dashboard-user-chip-avatar {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-weight: 700;
}

.dashboard-user-chip-avatar.has-image {
    background: rgba(255, 255, 255, 0.14);
}

.dashboard-user-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dashboard-user-chip-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.dashboard-user-chip-copy strong {
    font-size: 0.98rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-user-chip-copy span {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.2;
}

.dashboard-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 16px;
    background: var(--dashboard-surface);
    border: 1px solid rgba(31, 35, 48, 0.06);
    color: var(--ink);
}

.dashboard-icon-button svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-icon-button-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.dashboard-pos-button {
    min-height: 46px;
    padding: 0 18px;
    box-shadow: none;
}

.dashboard-metric-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 238, 0.72)),
        var(--panel);
}

.dashboard-metric-card::after {
    content: none;
}

.dashboard-metric-card-primary {
    background:
        radial-gradient(circle at top right, rgba(247, 211, 177, 0.82), transparent 32%),
        linear-gradient(180deg, rgba(255, 249, 240, 0.96), rgba(255, 239, 221, 0.86));
}

.metric-card span,
.text-note,
.list-row p,
td span {
    color: var(--muted);
}

.dashboard-page .metric-card span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
}

.dashboard-grid-top {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.95fr);
}

.dashboard-grid-main {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
}

.dashboard-stack {
    display: grid;
    gap: 20px;
}

.dashboard-page {
    display: grid;
    gap: 18px;
    background: transparent;
}

.dashboard-workspace,
.dashboard-primary-column,
.dashboard-secondary-column {
    display: grid;
    gap: 20px;
    min-height: 0;
}

.dashboard-panel {
    display: grid;
    gap: 18px;
    min-height: 0;
}

.dashboard-panel-body {
    min-height: 0;
}

.dashboard-scroll-area {
    height: 100%;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.dashboard-empty-block {
    display: grid;
    place-items: center;
    min-height: 0;
}

.dashboard-empty-state-card {
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.dashboard-empty-card {
    width: min(440px, 100%);
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.dashboard-empty-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 1rem;
}

.dashboard-empty-card p {
    margin: 0;
}

.dashboard-empty-card-inline {
    width: 100%;
    max-width: none;
}

.dashboard-empty-card-compact {
    width: min(460px, 100%);
}

.dashboard-empty-chart {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 18px;
    padding: 22px;
    min-height: 240px;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) - 4px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(250, 246, 239, 0.96)),
        radial-gradient(circle at top center, rgba(201, 111, 29, 0.08), transparent 36%);
}

.dashboard-empty-chart-visual {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
    width: min(360px, 100%);
    height: 82px;
}

.dashboard-empty-chart-visual span {
    display: block;
    width: 100%;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, rgba(201, 111, 29, 0.7), rgba(201, 111, 29, 0.14));
}

.dashboard-empty-chart-visual span:nth-child(1) { height: 24%; }
.dashboard-empty-chart-visual span:nth-child(2) { height: 38%; }
.dashboard-empty-chart-visual span:nth-child(3) { height: 30%; }
.dashboard-empty-chart-visual span:nth-child(4) { height: 52%; }
.dashboard-empty-chart-visual span:nth-child(5) { height: 34%; }
.dashboard-empty-chart-visual span:nth-child(6) { height: 60%; }
.dashboard-empty-chart-visual span:nth-child(7) { height: 42%; }

.dashboard-empty-chart-copy {
    display: grid;
    gap: 8px;
    width: min(420px, 100%);
    text-align: center;
}

.dashboard-empty-chart-copy strong {
    font-size: 1.12rem;
}

.dashboard-empty-chart-copy p {
    color: var(--muted);
    line-height: 1.6;
}

.dashboard-page .panel,
.dashboard-page .dashboard-metric-card {
    background: var(--dashboard-surface);
    backdrop-filter: none;
    border-color: rgba(31, 35, 48, 0.06);
    box-shadow: none;
}

.dashboard-page .dashboard-metric-card-primary {
    background: var(--dashboard-surface);
}

.dashboard-page .dashboard-empty-chart,
.dashboard-page .empty-state,
.dashboard-page .dashboard-empty-card {
    background: var(--dashboard-surface);
    border-color: rgba(31, 35, 48, 0.06);
    box-shadow: none;
}

.dashboard-page .inventory-legend-card,
.dashboard-page .list-row {
    background: var(--dashboard-surface);
    border-color: rgba(31, 35, 48, 0.06);
    box-shadow: none;
}

.dashboard-stat-note {
    display: grid;
    gap: 6px;
    text-align: right;
}

.dashboard-stat-note strong {
    font-size: 1.1rem;
}

.dashboard-stat-note span,
.sales-bar-head span,
.sales-bar-foot span,
.inventory-legend-card span,
.inventory-legend-head p {
    color: var(--muted);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.employee-overview-grid {
    margin-bottom: 18px;
}

.staff-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.staff-avatar {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-weight: 700;
}

.staff-avatar.has-image {
    background: rgba(255, 255, 255, 0.14);
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.profile-summary-card,
.profile-form-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
}

.profile-summary-card {
    position: sticky;
    top: 24px;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(247, 211, 177, 0.5), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 236, 0.82));
}

.profile-avatar-stack {
    display: grid;
    gap: 16px;
    justify-items: start;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.4rem;
    font-weight: 700;
}

.profile-avatar span,
.profile-upload-preview span {
    line-height: 1;
}

.profile-avatar.has-image {
    background: rgba(255, 255, 255, 0.76);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-summary-copy {
    display: grid;
    gap: 6px;
}

.profile-summary-copy h4 {
    margin: 0;
    font-size: 1.4rem;
}

.profile-summary-text {
    color: var(--muted);
    line-height: 1.65;
}

.profile-meta-list {
    display: grid;
    gap: 12px;
}

.profile-meta-row {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
}

.profile-meta-row span {
    color: var(--muted);
}

.profile-form-card {
    gap: 20px;
    background: rgba(255, 255, 255, 0.82);
}

.profile-form-section {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
}

.profile-section-head h4 {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

.profile-fields-grid {
    gap: 16px;
}

.profile-upload-panel {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.profile-upload-preview {
    display: grid;
    place-items: center;
    width: 144px;
    height: 144px;
    border-radius: 36px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.6rem;
    font-weight: 700;
}

.profile-upload-preview.has-image {
    background: rgba(255, 255, 255, 0.82);
}

.profile-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-file-field {
    gap: 10px;
}

.profile-file-field input[type="file"] {
    width: 100%;
    min-height: auto;
    padding: 12px 14px;
    border: 1px dashed rgba(31, 35, 48, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
}

.products-layout {
    align-items: start;
}

.panel {
    padding: 24px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 20px;
}

.section-head h3 {
    margin: 6px 0 0;
    font-size: 1.45rem;
}

.section-head-compact {
    margin-bottom: 10px;
}

.section-head-compact h3 {
    margin-top: 0;
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.text-link {
    color: var(--accent-strong);
    font-weight: 600;
}

.sales-chart {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    min-width: 0;
}

.sales-chart-axis {
    display: grid;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    align-items: end;
    padding: 8px 0 62px;
    color: var(--muted);
    font-size: 0.84rem;
}

.sales-chart-axis span {
    transform: translateY(50%);
}

.sales-chart-canvas {
    position: relative;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--border);
}

.sales-chart-canvas::before {
    content: "";
    position: absolute;
    inset: 18px 18px 74px;
    background:
        repeating-linear-gradient(
            to top,
            rgba(31, 35, 48, 0.08) 0,
            rgba(31, 35, 48, 0.08) 1px,
            transparent 1px,
            transparent 25%
        );
    pointer-events: none;
}

.sales-chart-columns {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 14px;
    width: max(100%, 700px);
    min-height: 338px;
    padding: 18px 18px 16px;
    align-items: end;
}

.sales-chart-column {
    display: grid;
    grid-template-rows: auto 1fr auto auto auto;
    gap: 8px;
    min-width: 0;
    text-align: center;
}

.sales-chart-column.is-today .sales-chart-day,
.sales-chart-column.is-today .sales-chart-value {
    color: var(--accent-strong);
}

.sales-chart-value,
.sales-chart-day {
    font-size: 1rem;
}

.sales-chart-date,
.sales-chart-orders {
    color: var(--muted);
    font-size: 0.9rem;
}

.sales-chart-bar-shell {
    position: relative;
    display: flex;
    align-items: end;
    justify-content: center;
    min-height: 220px;
}

.sales-chart-bar-shell::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(31, 35, 48, 0.14);
}

.sales-chart-bar {
    width: min(56px, 100%);
    border-radius: 16px 16px 10px 10px;
    background: linear-gradient(180deg, #f2af73, #c96f1d);
    box-shadow:
        inset 0 -12px 18px rgba(103, 50, 10, 0.16),
        0 8px 20px rgba(201, 111, 29, 0.18);
}

.sales-chart-column.is-today .sales-chart-bar {
    background: linear-gradient(180deg, #f7c390, #b95f13);
}

.sales-chart-bar.is-empty {
    background: linear-gradient(180deg, rgba(102, 113, 132, 0.34), rgba(102, 113, 132, 0.72));
    box-shadow: none;
}

.inventory-strip {
    display: flex;
    gap: 8px;
    min-height: 18px;
    overflow: hidden;
}

.inventory-strip-segment {
    min-width: 0;
    border-radius: 999px;
}

.inventory-legend-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.inventory-legend-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--border);
}

.inventory-legend-card strong {
    font-size: 1.5rem;
}

.inventory-legend-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.inventory-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.is-success.inventory-dot,
.inventory-strip-segment.is-success {
    background: var(--success);
}

.is-warning.inventory-dot,
.inventory-strip-segment.is-warning {
    background: var(--warning);
}

.is-danger.inventory-dot,
.inventory-strip-segment.is-danger {
    background: var(--danger);
}

.stack-list {
    display: grid;
    gap: 12px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--border);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
}

.is-success {
    color: var(--success);
    background: rgba(31, 122, 87, 0.14);
}

.is-warning {
    color: var(--warning);
    background: rgba(186, 122, 24, 0.14);
}

.is-danger {
    color: var(--danger);
    background: rgba(178, 58, 49, 0.14);
}

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

.single-column-form {
    grid-template-columns: 1fr;
    max-width: 560px;
}

.compact-form {
    margin-top: 18px;
}

.settings-form {
    display: grid;
    gap: 22px;
}

.settings-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.settings-media-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid var(--border);
}

.settings-media-head h4 {
    margin: 6px 0 0;
    font-size: 1.2rem;
}

.settings-media-preview {
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe0be, #f2af73);
    color: #4a250e;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.settings-media-preview.has-image {
    background: rgba(255, 255, 255, 0.76);
}

.settings-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.settings-favicon-preview {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 1.1rem;
}

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

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

label small {
    font-size: 0.88rem;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(31, 35, 48, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.82);
    font: inherit;
    color: var(--ink);
}

input:focus,
select:focus {
    outline: 2px solid rgba(201, 111, 29, 0.18);
    border-color: rgba(201, 111, 29, 0.45);
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.users-search-form {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.users-search-field {
    flex: 1 1 340px;
    display: grid;
    gap: 8px;
}

.users-search-field span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
}

.users-search-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

th,
td {
    padding: 14px 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid rgba(31, 35, 48, 0.08);
}

th {
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

td strong {
    display: block;
    margin-bottom: 4px;
}

.cell-meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form {
    margin: 0;
}

.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
    gap: 20px;
    align-items: start;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.product-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid var(--border);
}

.product-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.product-meta {
    color: var(--muted);
    line-height: 1.5;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.product-footer strong {
    font-size: 1.2rem;
}

.cart-panel {
    position: sticky;
    top: 24px;
}

.cart-table {
    margin-bottom: 16px;
}

.quantity-input {
    min-width: 74px;
}

.totals {
    display: grid;
    gap: 12px;
    padding: 18px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.total-row-strong {
    padding-top: 12px;
    border-top: 1px solid rgba(31, 35, 48, 0.1);
}

.empty-state {
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.55);
    color: var(--muted);
    line-height: 1.7;
}

@media (min-width: 1181px) {
    .shell {
        height: 100dvh;
        grid-template-rows: minmax(0, 1fr);
        align-items: stretch;
        overflow: hidden;
    }

    .main {
        height: 100%;
        min-height: 0;
        align-content: stretch;
        overflow: hidden;
    }

    .dashboard-page {
        display: grid;
        height: calc(100dvh - (var(--shell-space) * 2));
        min-height: 0;
        max-height: calc(100dvh - (var(--shell-space) * 2));
        grid-template-rows: auto minmax(0, 1fr);
        gap: 10px;
        overflow: hidden;
    }

    .dashboard-summary-grid {
        align-items: stretch;
        gap: 10px;
        margin-bottom: 0;
    }

    .dashboard-workspace {
        height: 100%;
        grid-template-columns: minmax(0, 1.62fr) minmax(320px, 0.98fr);
        gap: 10px;
        align-items: stretch;
    }

    .dashboard-primary-column {
        grid-template-rows: minmax(0, 1.1fr) minmax(132px, 0.72fr);
        gap: 10px;
    }

    .dashboard-secondary-column {
        grid-template-rows: auto auto minmax(0, 1fr);
        gap: 10px;
    }

    .dashboard-page .metric-card {
        gap: 6px;
        min-height: 0;
        padding: 10px 12px;
    }

    .dashboard-page .metric-card strong {
        font-size: 0.98rem;
        line-height: 1.05;
    }

    .dashboard-page .metric-card span {
        font-size: 0.76rem;
        line-height: 1.25;
    }

    .dashboard-page .dashboard-workspace,
    .dashboard-page .dashboard-primary-column,
    .dashboard-page .dashboard-secondary-column,
    .dashboard-page .dashboard-workspace > *,
    .dashboard-page .dashboard-primary-column > *,
    .dashboard-page .dashboard-secondary-column > * {
        min-height: 0;
    }

    .dashboard-page .dashboard-chart-panel {
        min-height: 0;
    }

    .dashboard-page .dashboard-recent-panel {
        min-height: 0;
        align-self: stretch;
    }

    .dashboard-page .dashboard-inventory-panel {
        align-content: start;
    }

    .dashboard-page .dashboard-low-stock-panel {
        min-height: 0;
        align-self: stretch;
    }

    .dashboard-page .dashboard-expiry-panel {
        min-height: 0;
    }

    .dashboard-page .panel {
        height: auto;
        padding: 12px;
        overflow: hidden;
    }

    .dashboard-page .dashboard-panel {
        grid-template-rows: auto minmax(0, 1fr);
        gap: 8px;
        height: 100%;
    }

    .dashboard-page .section-head {
        margin-bottom: 0;
    }

    .dashboard-page .section-head h3 {
        font-size: 0.94rem;
    }

    .dashboard-page .sales-chart {
        grid-template-columns: 1fr;
        gap: 0;
        height: 100%;
        min-height: 0;
    }

    .dashboard-page .sales-chart-axis {
        display: none;
    }

    .dashboard-page .sales-chart-canvas::before {
        inset: 6px 8px 22px;
    }

    .dashboard-page .sales-chart-canvas {
        height: 100%;
        min-height: 0;
    }

    .dashboard-page .sales-chart-columns {
        width: 100%;
        min-height: 0;
        height: 100%;
        gap: 4px;
        padding: 6px 8px 4px;
    }

    .dashboard-page .sales-chart-column {
        gap: 3px;
    }

    .dashboard-page .sales-chart-value {
        display: none;
    }

    .dashboard-page .sales-chart-day {
        font-size: 0.74rem;
        line-height: 1;
    }

    .dashboard-page .sales-chart-date,
    .dashboard-page .sales-chart-orders {
        display: none;
    }

    .dashboard-page .sales-chart-bar-shell {
        min-height: 50px;
    }

    .dashboard-page .sales-chart-bar {
        width: min(18px, 100%);
    }

    .dashboard-page .inventory-legend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-content: start;
    }

    .dashboard-page .inventory-legend-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 10px;
        align-items: center;
        padding: 8px 10px;
    }

    .dashboard-page .inventory-legend-head {
        grid-column: 1 / 2;
        gap: 8px;
    }

    .dashboard-page .inventory-legend-card span {
        grid-column: 1 / 2;
        font-size: 0.7rem;
    }

    .dashboard-page .inventory-legend-card strong {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 0.92rem;
        line-height: 1;
    }

    .dashboard-page .list-row {
        padding: 8px 10px;
        gap: 8px;
    }

    .dashboard-page .badge {
        min-width: 48px;
        padding: 5px 7px;
        font-size: 0.72rem;
    }

    .dashboard-page .empty-state {
        padding: 10px 12px;
        font-size: 0.8rem;
        line-height: 1.35;
    }

    .dashboard-page .dashboard-recent-panel .dashboard-panel-body,
    .dashboard-page .dashboard-low-stock-panel .dashboard-panel-body {
        height: 100%;
    }

    .dashboard-page .dashboard-expiry-panel .dashboard-panel-body {
        height: 100%;
    }

    .dashboard-page .dashboard-empty-block {
        padding: 0;
    }

    .dashboard-page .dashboard-empty-state-card {
        display: grid;
        place-items: center;
        gap: 8px;
        height: 100%;
        padding: 16px;
        font-size: 0.84rem;
        line-height: 1.45;
    }

    .dashboard-page .dashboard-empty-state-card strong {
        font-size: 1rem;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-workspace {
        grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.94fr);
        align-items: stretch;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-primary-column {
        grid-template-rows: minmax(220px, 0.88fr) minmax(0, 1fr);
        align-content: stretch;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-primary-column > *,
    .dashboard-page.dashboard-page-quiet .dashboard-secondary-column > * {
        align-self: stretch;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-chart-panel {
        height: 100%;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-chart-panel .dashboard-panel-body,
    .dashboard-page.dashboard-page-quiet .dashboard-recent-panel .dashboard-panel-body {
        height: 100%;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-empty-chart {
        min-height: 0;
        height: 100%;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-empty-chart-copy {
        width: min(400px, 100%);
    }

    .dashboard-page.dashboard-page-quiet .dashboard-recent-panel .dashboard-empty-block {
        min-height: 0;
        height: 100%;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-recent-panel .dashboard-empty-card {
        width: min(420px, 100%);
    }

    .dashboard-page.dashboard-page-quiet .dashboard-low-stock-panel .dashboard-empty-block {
        min-height: 0;
    }

    .dashboard-page.dashboard-page-quiet .dashboard-low-stock-panel .dashboard-empty-card,
    .dashboard-page.dashboard-page-quiet .dashboard-inventory-panel .dashboard-empty-card,
    .dashboard-page.dashboard-page-quiet .dashboard-expiry-panel .dashboard-empty-card {
        padding: 12px 14px;
    }

    .dashboard-page .table-wrap,
    .dashboard-page .dashboard-expiry-panel .dashboard-scroll-area {
        height: 100%;
    }

    .dashboard-page th,
    .dashboard-page td {
        padding: 8px 8px;
    }

    .dashboard-page .cell-meta {
        font-size: 0.74rem;
    }
}

@media (min-width: 1181px) and (max-height: 920px) {
    :root {
        --shell-space: 10px;
        --shell-gap: 10px;
        --sidebar-width: 230px;
    }

    .sidebar {
        gap: 14px;
        padding: 16px 14px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .brand h1 {
        font-size: 1.32rem;
    }

    .nav {
        gap: 6px;
    }

    .nav-link,
    .nav-parent {
        padding: 10px 12px;
        font-size: 0.92rem;
    }

    .nav-sublink {
        padding: 7px 10px 7px 14px;
        font-size: 0.86rem;
    }

    .sidebar-session {
        gap: 10px;
        padding: 14px;
    }

    .sidebar-session-avatar {
        width: 42px;
        height: 42px;
    }

    .sidebar-session-copy strong {
        font-size: 1rem;
    }

    .sidebar-session-copy span {
        font-size: 0.82rem;
    }
}

@media (max-width: 1680px), (max-height: 1120px) {
    :root {
        --shell-space: 18px;
        --shell-gap: 18px;
        --sidebar-width: 248px;
    }

    .sidebar {
        gap: 18px;
        padding: 22px 18px;
    }

    .brand {
        gap: 12px;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .brand h1 {
        font-size: 1.45rem;
    }

    .nav {
        gap: 8px;
    }

    .nav-link,
    .nav-parent {
        padding: 12px 14px;
        font-size: 0.96rem;
    }

    .nav-submenu {
        gap: 6px;
        padding-left: 12px;
    }

    .nav-sublink {
        padding: 8px 12px 8px 16px;
        font-size: 0.92rem;
    }

    .sidebar-session {
        gap: 12px;
        padding: 16px;
    }

    .sidebar-session-avatar {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .sidebar-session-copy span {
        font-size: 0.88rem;
    }

    .main {
        gap: 18px;
    }

    .metrics-grid,
    .dashboard-grid,
    .dashboard-stack,
    .content-grid,
    .pos-layout {
        gap: 16px;
    }

    .metric-card {
        padding: 18px;
    }

    .metric-card strong {
        font-size: 1.55rem;
    }

    .panel {
        padding: 20px;
    }

    .section-head {
        margin-bottom: 16px;
    }

    .section-head h3 {
        font-size: 1.32rem;
    }

    .sales-chart {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px;
    }

    .sales-chart-axis {
        padding: 8px 0 56px;
        font-size: 0.78rem;
    }

    .sales-chart-canvas::before {
        inset: 16px 16px 62px;
    }

    .sales-chart-columns {
        width: 100%;
        min-height: 280px;
        gap: 10px;
        padding: 16px 16px 14px;
    }

    .sales-chart-bar-shell {
        min-height: 170px;
    }

    .sales-chart-bar {
        width: min(40px, 100%);
    }

    .inventory-legend-card,
    .list-row {
        padding: 14px 16px;
    }
}

@media (max-width: 1440px), (max-height: 900px) {
    :root {
        --shell-space: 14px;
        --shell-gap: 14px;
        --sidebar-width: 232px;
    }

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

    .dashboard-toolbar-card {
        grid-column: 1 / -1;
        justify-content: flex-start;
        justify-self: stretch;
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-user-chip {
        margin-left: 0;
    }

    .dashboard-grid-top,
    .dashboard-grid-main {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 18px 16px;
    }

    .panel {
        padding: 18px;
    }

    .section-head h3 {
        font-size: 1.22rem;
    }

    .sales-chart {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .sales-chart-axis {
        padding: 6px 0 50px;
        font-size: 0.72rem;
    }

    .sales-chart-canvas::before {
        inset: 14px 14px 56px;
    }

    .sales-chart-columns {
        min-height: 244px;
        gap: 8px;
        padding: 14px 12px 12px;
    }

    .sales-chart-bar-shell {
        min-height: 144px;
    }

    .sales-chart-value,
    .sales-chart-day {
        font-size: 0.92rem;
    }

    .sales-chart-date,
    .sales-chart-orders {
        font-size: 0.82rem;
    }
}

@media (max-width: 1180px) {
    .content-grid,
    .pos-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-grid-top,
    .dashboard-grid-main,
    .inventory-legend-grid,
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .cart-panel,
    .profile-summary-card {
        position: static;
        min-height: auto;
    }
}

@media (max-width: 960px) {
    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 14px;
        background: rgba(243, 237, 226, 0.9);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid rgba(31, 35, 48, 0.08);
    }

    .mobile-topbar-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-topbar-mark {
        display: inline-grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffe0be, #f2af73);
        color: #4a250e;
        font-size: 0.92rem;
        font-weight: 700;
        flex: 0 0 auto;
    }

    .mobile-topbar-name {
        min-width: 0;
        color: var(--ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .mobile-nav-button,
    .sidebar-close {
        position: relative;
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(31, 35, 48, 0.12);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.8);
        color: var(--ink);
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-button span {
        position: absolute;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .mobile-nav-button span:nth-child(1) {
        transform: translateY(-6px);
    }

    .mobile-nav-button span:nth-child(3) {
        transform: translateY(6px);
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(1) {
        transform: rotate(45deg);
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(2) {
        opacity: 0;
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        background: rgba(19, 29, 40, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.is-mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .shell {
        grid-template-columns: 1fr;
        padding: 0 14px 14px;
        gap: 14px;
        min-height: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        grid-template-rows: auto minmax(0, 1fr) auto;
        width: min(78vw, 360px);
        max-width: calc(100vw - 28px);
        min-height: 100dvh;
        max-height: 100dvh;
        padding: 20px;
        border-radius: 0 24px 24px 0;
        overflow: hidden;
        transform: translateX(calc(-100% - 20px));
        transition: transform 220ms ease;
    }

    .nav {
        overflow-y: auto;
        padding-right: 4px;
    }

    body.is-mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .brand {
        gap: 12px;
    }

    .brand h1 {
        font-size: 1.45rem;
    }

    .sidebar-close {
        flex: 0 0 auto;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(247, 242, 234, 0.82);
    }

    .sidebar-close span {
        position: absolute;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .sidebar-close span:first-child {
        transform: rotate(45deg);
    }

    .sidebar-close span:last-child {
        transform: rotate(-45deg);
    }

    .main {
        padding-top: 2px;
    }

    .dashboard-toolbar-card {
        display: none;
    }

    .nav-mobile-quick-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 10px;
        align-items: center;
        margin-bottom: 6px;
    }

    .nav-mobile-action {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(247, 242, 234, 0.9);
        background: rgba(255, 255, 255, 0.08);
        transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
    }

    .nav-mobile-action:hover,
    .nav-mobile-action.is-active {
        transform: translateY(-1px);
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.18);
    }

    .nav-mobile-action-pos {
        padding: 0 16px;
        justify-content: center;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #fff7ef;
        background: linear-gradient(135deg, var(--accent), var(--accent-strong));
        border-color: transparent;
    }

    .nav-mobile-action-pos:hover,
    .nav-mobile-action-pos.is-active {
        background: linear-gradient(135deg, var(--accent), var(--accent-strong));
        border-color: transparent;
    }

    .nav-mobile-action-icon {
        width: 46px;
        padding: 0;
    }

    .nav-mobile-action-icon svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.9;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .nav-mobile-action-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: var(--danger);
        color: #fff;
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
    }

    .nav-mobile-action-avatar {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        overflow: hidden;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffe0be, #f2af73);
        color: #4a250e;
        font-weight: 700;
        font-size: 0.88rem;
    }

    .nav-mobile-action-avatar.has-image {
        background: rgba(255, 255, 255, 0.14);
    }

    .nav-mobile-action-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

@media (max-width: 760px) {
    .auth-body {
        padding: 14px;
    }

    .auth-card {
        padding: 22px;
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 60;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 14px;
        background: rgba(243, 237, 226, 0.9);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid rgba(31, 35, 48, 0.08);
    }

    .mobile-topbar-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-topbar-mark {
        display: inline-grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffe0be, #f2af73);
        color: #4a250e;
        font-size: 0.92rem;
        font-weight: 700;
        flex: 0 0 auto;
    }

    .mobile-topbar-name {
        min-width: 0;
        color: var(--ink);
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.2rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .users-search-form {
        align-items: stretch;
    }

    .users-search-field {
        flex-basis: 100%;
    }

    .users-search-actions {
        width: 100%;
    }

    .mobile-nav-button,
    .sidebar-close {
        position: relative;
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid rgba(31, 35, 48, 0.12);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.8);
        color: var(--ink);
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-button span {
        position: absolute;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .mobile-nav-button span:nth-child(1) {
        transform: translateY(-6px);
    }

    .mobile-nav-button span:nth-child(3) {
        transform: translateY(6px);
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(1) {
        transform: rotate(45deg);
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(2) {
        opacity: 0;
    }

    body.is-mobile-nav-open .mobile-nav-button span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: block;
        background: rgba(19, 29, 40, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    body.is-mobile-nav-open .mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .shell {
        grid-template-columns: 1fr;
        padding: 0 14px 14px;
        gap: 14px;
        min-height: auto;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        grid-template-rows: auto minmax(0, 1fr) auto;
        width: min(84vw, 340px);
        max-width: calc(100vw - 28px);
        min-height: 100dvh;
        max-height: 100dvh;
        padding: 20px;
        border-radius: 0 24px 24px 0;
        overflow: hidden;
        transform: translateX(calc(-100% - 20px));
        transition: transform 220ms ease;
    }

    .nav {
        overflow-y: auto;
        padding-right: 4px;
    }

    body.is-mobile-nav-open .sidebar {
        transform: translateX(0);
    }

    .brand {
        gap: 12px;
    }

    .brand h1 {
        font-size: 1.45rem;
    }

    .sidebar-close {
        flex: 0 0 auto;
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(247, 242, 234, 0.82);
    }

    .sidebar-close span {
        position: absolute;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .sidebar-close span:first-child {
        transform: rotate(45deg);
    }

    .sidebar-close span:last-child {
        transform: rotate(-45deg);
    }

    .main {
        padding-top: 2px;
    }

    .dashboard-toolbar-card {
        display: none;
    }

    .nav-mobile-quick-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 10px;
        align-items: center;
        margin-bottom: 6px;
    }

    .nav-mobile-action {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(247, 242, 234, 0.9);
        background: rgba(255, 255, 255, 0.08);
        transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
    }

    .nav-mobile-action:hover,
    .nav-mobile-action.is-active {
        transform: translateY(-1px);
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.18);
    }

    .nav-mobile-action-pos {
        padding: 0 16px;
        justify-content: center;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #fff7ef;
        background: linear-gradient(135deg, var(--accent), var(--accent-strong));
        border-color: transparent;
    }

    .nav-mobile-action-pos:hover,
    .nav-mobile-action-pos.is-active {
        background: linear-gradient(135deg, var(--accent), var(--accent-strong));
        border-color: transparent;
    }

    .nav-mobile-action-icon {
        width: 46px;
        padding: 0;
    }

    .nav-mobile-action-icon svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.9;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .nav-mobile-action-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: var(--danger);
        color: #fff;
        font-size: 0.68rem;
        font-weight: 700;
        line-height: 1;
    }

    .nav-mobile-action-avatar {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        overflow: hidden;
        border-radius: 12px;
        background: linear-gradient(145deg, #ffe0be, #f2af73);
        color: #4a250e;
        font-weight: 700;
        font-size: 0.88rem;
    }

    .nav-mobile-action-avatar.has-image {
        background: rgba(255, 255, 255, 0.14);
    }

    .nav-mobile-action-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .dashboard-summary-grid .dashboard-metric-card {
        aspect-ratio: 1 / 1;
        padding: 16px;
        gap: 10px;
        align-content: center;
        justify-items: center;
        text-align: center;
    }

    .dashboard-summary-grid .dashboard-metric-card .eyebrow {
        margin: 0;
        text-align: center;
    }

    .dashboard-summary-grid .dashboard-metric-card strong {
        font-size: clamp(1.35rem, 7vw, 2rem);
        line-height: 1.05;
    }

    .dashboard-summary-grid .dashboard-metric-card span {
        max-width: 12ch;
        margin: 0 auto;
        line-height: 1.35;
    }

    .hero-card {
        padding: 22px;
        flex-direction: column;
        align-items: start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .profile-page-panel {
        padding: 16px;
    }

    .profile-page-panel > .section-head {
        margin-bottom: 14px;
    }

    .profile-page-panel > .section-head .eyebrow {
        display: none;
    }

    .profile-page-panel > .section-head h3 {
        margin-top: 0;
        font-size: 1.8rem;
    }

    .profile-layout {
        gap: 14px;
    }

    .profile-summary-card {
        gap: 12px;
        padding: 16px;
        border-radius: 18px;
    }

    .profile-avatar-stack {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        border-radius: 22px;
        font-size: 1.8rem;
    }

    .profile-summary-copy {
        gap: 4px;
        min-width: 0;
    }

    .profile-summary-copy h4 {
        font-size: 1.12rem;
    }

    .profile-summary-text {
        display: none;
    }

    .profile-meta-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .profile-meta-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
    }

    .profile-meta-row:last-child {
        grid-column: auto;
    }

    .profile-meta-row strong {
        font-size: 0.96rem;
        line-height: 1.2;
        text-align: right;
    }

    .profile-form-card {
        gap: 14px;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .profile-form-section {
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .profile-section-head h4 {
        margin-top: 4px;
        font-size: 1.05rem;
    }

    .profile-upload-panel {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }

    .profile-upload-preview {
        width: 92px;
        height: 92px;
        border-radius: 24px;
        font-size: 1.9rem;
    }

    .profile-file-field input[type="file"] {
        padding: 10px 12px;
        font-size: 0.92rem;
    }

    .profile-page-panel .section-actions {
        width: 100%;
    }

    .profile-page-panel .section-actions .button {
        width: 100%;
        justify-content: center;
    }

    .settings-media-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel > .section-head {
        flex-direction: column;
        align-items: start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .dashboard-panel > .section-head h3 {
        font-size: 1.2rem;
        line-height: 1.15;
    }

    .dashboard-panel > .section-head .dashboard-stat-note {
        gap: 2px;
        text-align: left;
    }

    .dashboard-panel > .section-head .dashboard-stat-note strong {
        font-size: 1rem;
    }

    .inventory-strip {
        min-height: 14px;
        gap: 6px;
    }

    .inventory-legend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .inventory-legend-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 12px;
        align-items: center;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .inventory-legend-head {
        grid-column: 1 / 2;
        gap: 8px;
    }

    .inventory-legend-head p {
        font-size: 0.98rem;
    }

    .inventory-legend-card strong {
        grid-column: 2 / 3;
        grid-row: 1 / 3;
        align-self: center;
        font-size: 1.35rem;
        line-height: 1;
    }

    .inventory-legend-card span {
        grid-column: 1 / 2;
        font-size: 0.84rem;
    }

    .inventory-legend-card:last-child {
        grid-column: 1 / -1;
    }

    .sales-chart {
        grid-template-columns: 1fr;
    }

    .sales-chart-axis {
        display: none;
    }

    .sales-chart-canvas {
        overflow: hidden;
        border-radius: 18px;
    }

    .sales-chart-canvas::before {
        inset: 14px 12px 44px;
    }

    .sales-chart-columns {
        width: 100%;
        min-width: 0;
        min-height: 214px;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 6px;
        padding: 12px 10px 12px;
    }

    .sales-chart-column {
        display: flex;
        flex-direction: column;
        justify-content: end;
        align-items: center;
        gap: 8px;
    }

    .sales-chart-value {
        display: none;
    }

    .sales-chart-bar-shell {
        min-height: 132px;
        width: 100%;
    }

    .sales-chart-bar {
        width: min(24px, 100%);
        border-radius: 10px 10px 8px 8px;
    }

    .sales-chart-day {
        font-size: 0.84rem;
        line-height: 1;
    }

    .sales-chart-date,
    .sales-chart-orders {
        display: none;
    }

    .panel {
        padding: 20px;
    }

    th,
    td {
        padding-left: 8px;
        padding-right: 8px;
    }
}
