:root {
    --cream: #f3ede3;
    --cream-deep: #e7ded0;
    --white: #ffffff;
    --black: #151515;
    --gray-900: #242424;
    --gray-700: #4b4b4b;
    --gray-500: #777777;
    --gray-300: #d7d7d7;
    --gray-200: #e8e8e8;
    --gray-100: #f6f6f6;
    --danger-bg: #fff1f1;
    --danger-text: #8a1f1f;
    --success-bg: #eff8f1;
    --success-text: #235f32;
    --header-height: 72px;
    --sidebar-width: 280px;
    --radius: 8px;
    --shadow: 0 24px 70px rgba(21, 21, 21, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--gray-900);
    background: var(--cream);
    line-height: 1.5;
    letter-spacing: 0;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.login-page {
    background:
            linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(243, 237, 227, 0.92)),
            var(--cream);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
}

.login-panel {
    width: min(100%, 430px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(21, 21, 21, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 38px;
}

.brand-stack {
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-bottom: 34px;
}

.brand-logo {
    width: min(170px, 62vw);
    height: auto;
    display: block;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--black);
}

.login-version {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 600;
}

.login-heading {
    text-align: center;
    margin-bottom: 26px;
}

.login-heading h1,
.page-heading h1 {
    margin: 0;
    color: var(--black);
    font-size: 28px;
    line-height: 1.18;
}

.login-heading p,
.page-heading p {
    margin: 10px 0 0;
    color: var(--gray-500);
}

.auth-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 600;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0 14px;
    color: var(--black);
    background: var(--white);
    outline: none;
}

.field textarea {
    min-height: 150px;
    padding: 12px 14px;
    resize: vertical;
}

.field select {
    appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.10);
}

.field-error {
    color: var(--danger-text);
    font-size: 12px;
    font-weight: 700;
}

.checkbox-field {
    align-content: start;
}

.checkbox-control {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-900);
    font-weight: 800;
    cursor: pointer;
}

.checkbox-control input {
    appearance: none;
    min-height: 0;
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    flex: 0 0 auto;
}

.checkbox-control input::after {
    content: "";
    width: 10px;
    height: 6px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}

.checkbox-control input:checked {
    border-color: var(--black);
    background: var(--black);
}

.checkbox-control input:checked::after {
    opacity: 1;
}

.checkbox-control input:focus {
    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.10);
}

.primary-button,
.primary-link-button,
.secondary-link-button,
.ghost-button,
.icon-button {
    border: 0;
    cursor: pointer;
}

.primary-button {
    min-height: 48px;
    border-radius: var(--radius);
    background: var(--black);
    color: var(--white);
    font-weight: 700;
}

.primary-button:hover,
.primary-link-button:hover {
    background: var(--gray-900);
}

.primary-link-button,
.secondary-link-button {
    min-height: 42px;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
}

.primary-link-button {
    background: var(--black);
    color: var(--white);
}

.secondary-link-button {
    background: var(--gray-100);
    color: var(--black);
    border: 1px solid var(--gray-200);
}

.secondary-link-button:hover {
    background: var(--gray-200);
}

.alert {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 240ms ease, transform 240ms ease, margin 240ms ease, padding 240ms ease, max-height 240ms ease;
    max-height: 120px;
    overflow: hidden;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    max-height: 0;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
    border: 1px solid rgba(138, 31, 31, 0.16);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(35, 95, 50, 0.16);
}

.app-page {
    padding-top: var(--header-height);
}

.app-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-height);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 26px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(21, 21, 21, 0.08);
    backdrop-filter: blur(14px);
}

.header-left,
.header-right,
.header-brand,
.user-chip {
    display: flex;
    align-items: center;
}

.header-left,
.header-right {
    gap: 14px;
    min-width: 0;
}

.header-right {
    gap: 18px;
}

.header-brand {
    gap: 10px;
    min-width: 0;
    font-weight: 800;
    color: var(--black);
}

.header-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.header-brand span,
.username {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.icon-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--gray-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.icon-button span {
    width: 18px;
    height: 2px;
    background: var(--black);
    border-radius: 999px;
}

.user-chip {
    gap: 9px;
    min-width: 0;
    padding-right: 18px;
    border-right: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
}

.user-chip:hover {
    color: var(--black);
}

.user-chip:focus-visible {
    outline: 3px solid rgba(21, 21, 21, 0.16);
    outline-offset: 3px;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--black);
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
}

.username {
    max-width: 150px;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 700;
}

.ghost-button {
    min-height: 38px;
    border-radius: var(--radius);
    padding: 0 16px;
    background: var(--gray-100);
    color: var(--black);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ghost-button:hover {
    background: var(--gray-200);
}

.app-sidebar {
    position: fixed;
    inset: var(--header-height) auto 0 0;
    width: var(--sidebar-width);
    z-index: 15;
    background: var(--white);
    border-right: 1px solid rgba(21, 21, 21, 0.08);
    padding: 22px 16px;
}

.menu-list {
    display: grid;
    gap: 6px;
}

.menu-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 800;
}

.menu-link:hover {
    background: var(--cream);
    color: var(--black);
}

.menu-icon,
.menu-card-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    flex: 0 0 auto;
}

.menu-icon i,
.menu-card-icon i {
    color: var(--black);
    font-size: 14px;
    line-height: 1;
}

.menu-empty {
    padding: 14px;
    color: var(--gray-500);
    font-size: 14px;
}

.content-shell {
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    padding: 34px;
}

.page-stack {
    display: grid;
    gap: 24px;
    width: min(100%, 1100px);
}

.page-heading {
    display: grid;
    gap: 4px;
}

.split-heading {
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 18px;
}

.eyebrow {
    margin: 0;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.surface {
    background: var(--white);
    border: 1px solid rgba(21, 21, 21, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(21, 21, 21, 0.06);
}

.surface-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--gray-200);
}

.surface-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--black);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 18px;
}

.menu-card {
    min-height: 112px;
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
}

.menu-card:hover {
    border-color: var(--black);
    background: var(--gray-100);
}

.menu-card strong {
    color: var(--black);
    font-size: 14px;
}

.home-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 18px;
}

.home-metric-card {
    display: grid;
    align-content: center;
    gap: 10px;
    min-height: 150px;
    padding: 24px;
}

.home-metric-label {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.home-metric-card strong {
    color: var(--black);
    font-size: 32px;
    line-height: 1.1;
}

.home-dashboard-panel {
    padding: 18px;
}

.home-list {
    display: grid;
    gap: 10px;
}

.home-list-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.home-list-row:last-child {
    border-bottom: 0;
}

.home-list-row strong,
.home-list-row small {
    display: block;
}

.home-list-row strong {
    color: var(--black);
    font-size: 14px;
}

.home-list-row small {
    margin-top: 2px;
    color: var(--gray-500);
    font-size: 13px;
}

.home-rank-position {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--black);
    font-size: 13px;
    font-weight: 900;
}

.home-empty {
    padding: 18px 0;
}

.financial-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 240px)) auto;
    align-items: end;
    gap: 12px;
    padding: 18px;
}

.financial-filter-submit {
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
}

.financial-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 18px;
}

.financial-total-card small {
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 800;
}

.financial-history-panel {
    grid-row: span 2;
}

.financial-history-row {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.financial-history-row:last-child {
    border-bottom: 0;
}

.financial-history-row span {
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 800;
}

.financial-history-row strong {
    color: var(--black);
    font-size: 14px;
    white-space: nowrap;
}

.sidebar-backdrop {
    display: none;
}

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

.mobile-card-list {
    display: none;
}

.list-toolbar {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.list-toolbar label {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.list-toolbar select {
    min-height: 38px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--black);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
}

.data-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--gray-500);
    background: var(--gray-100);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.data-table td {
    color: var(--gray-700);
    font-size: 14px;
}

.data-table td strong,
.data-table td small {
    display: block;
}

.data-table td strong {
    color: var(--black);
    font-size: 14px;
}

.data-table td small {
    color: var(--gray-500);
    margin-top: 4px;
}

.money-cell {
    color: var(--black);
    font-weight: 800;
    white-space: nowrap;
}

.quantity-cell {
    color: var(--black);
    font-size: 16px;
    font-weight: 900;
}

.quantity-pill {
    min-width: 36px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--black);
    font-size: 14px;
    font-weight: 900;
}

.quantity-pill-labeled {
    min-width: 92px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 0 9px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 900;
    margin: 0 4px 4px 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.status-active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-inactive {
    background: var(--gray-100);
    color: var(--gray-500);
    border: 1px solid var(--gray-200);
}

.status-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.action-cell {
    text-align: right;
}

.table-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    border-radius: var(--radius);
    padding: 0 12px;
    background: var(--gray-100);
    color: var(--black);
    font-size: 13px;
    font-weight: 900;
}

.table-action:hover {
    background: var(--cream);
}

.table-action-group,
.mobile-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.table-action-group form,
.mobile-card-actions form {
    margin: 0;
}

.table-action-danger {
    border: 0;
    cursor: pointer;
    background: var(--danger-bg);
    color: var(--danger-text);
}

.table-action-danger:hover {
    background: #ffe3e3;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid var(--gray-200);
}

.pagination-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 36px;
    border-radius: var(--radius);
    padding: 0 12px;
    background: var(--gray-100);
    color: var(--black);
    font-size: 13px;
    font-weight: 900;
}

.pagination-link.active {
    background: var(--black);
    color: var(--white);
}

.pagination-link.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.audit-log-table {
    min-width: 1080px;
}

.audit-log-table td {
    vertical-align: top;
}

.log-detail {
    max-width: 340px;
}

.log-detail summary {
    color: var(--black);
    cursor: pointer;
    font-weight: 800;
}

.log-detail pre {
    max-height: 260px;
    overflow: auto;
    margin: 10px 0 0;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.stock-update-form {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.stock-update-form label {
    margin: 0;
}

.stock-update-form input {
    width: 96px;
    min-height: 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0 10px;
    color: var(--black);
    background: var(--white);
    font-weight: 800;
}

.stock-update-form input:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.10);
}

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

.empty-state {
    text-align: center;
    color: var(--gray-500);
    font-weight: 700;
}

.form-surface {
    padding: 22px;
}

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

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

.form-submit {
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
}

.account-surface {
    width: min(100%, 680px);
    display: grid;
    gap: 20px;
}

.account-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--gray-200);
}

.account-summary strong,
.account-summary small {
    display: block;
}

.account-summary strong {
    color: var(--black);
    font-size: 16px;
}

.account-summary small {
    margin-top: 2px;
    color: var(--gray-500);
    font-size: 13px;
    font-weight: 800;
}

.account-avatar {
    width: 44px;
    height: 44px;
}

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

.readonly-value {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0 14px;
    background: var(--gray-100);
    color: var(--black);
    font-weight: 900;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.permission-option {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 10px 12px;
    background: var(--white);
    color: var(--gray-900);
    font-weight: 900;
    cursor: pointer;
}

.permission-option:hover {
    background: var(--gray-100);
}

.permission-option input {
    appearance: none;
    min-height: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    flex: 0 0 auto;
}

.permission-option input::after {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}

.permission-option input:checked {
    border-color: var(--black);
    background: var(--black);
}

.permission-option input:checked::after {
    opacity: 1;
}

.permission-option:has(input:checked) {
    border-color: var(--black);
    background: var(--cream);
}

.is-hidden {
    display: none;
}

.mobile-entity-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    padding: 16px;
}

.mobile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mobile-card-header strong,
.mobile-card-header small {
    display: block;
}

.mobile-card-header strong {
    color: var(--black);
    font-size: 15px;
}

.mobile-card-header small {
    margin-top: 3px;
    color: var(--gray-500);
    font-size: 13px;
}

.mobile-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.mobile-card-details div {
    min-width: 0;
}

.mobile-card-details dt {
    margin: 0 0 3px;
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.mobile-card-details dd {
    margin: 0;
    color: var(--gray-900);
    font-size: 14px;
    overflow-wrap: anywhere;
}

.detail-wide {
    grid-column: 1 / -1;
}

.mobile-card-action {
    width: 100%;
    justify-content: center;
}

.mobile-card-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 16px;
}

.mobile-card-actions form {
    display: grid;
}

.mobile-stock-form {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.mobile-stock-form input {
    width: 100%;
    min-height: 48px;
}

.order-items-panel {
    display: grid;
    gap: 12px;
}

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

.order-items-heading strong {
    color: var(--black);
}

.order-items-list {
    display: grid;
    gap: 10px;
}

.order-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-100);
}

.order-remove-item {
    min-height: 48px;
}

.mobile-empty {
    padding: 20px;
}

@media (max-width: 860px) {
    .login-panel {
        padding: 28px 22px;
    }

    .app-header {
        padding: 0 14px;
        gap: 10px;
    }

    .icon-button {
        display: inline-flex;
    }

    .header-left,
    .header-right {
        gap: 10px;
    }

    .header-brand {
        gap: 8px;
    }

    .header-brand img {
        width: 36px;
        height: 36px;
    }

    .header-brand span {
        max-width: 140px;
        font-size: 13px;
        line-height: 1.15;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .username {
        display: none;
    }

    .ghost-button {
        width: 38px;
        min-width: 38px;
        padding: 0;
        justify-content: center;
    }

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

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 180ms ease;
        box-shadow: var(--shadow);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: var(--header-height) 0 0 0;
        z-index: 10;
        background: rgba(21, 21, 21, 0.28);
    }

    .content-shell {
        margin-left: 0;
        padding: 24px 16px;
    }

    .table-wrap {
        display: none;
    }

    .mobile-card-list {
        display: grid;
        gap: 12px;
        padding: 14px;
    }

    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .list-toolbar select {
        width: 100%;
    }

    .pagination-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .pagination-link {
        width: 100%;
    }

    .split-heading {
        grid-template-columns: 1fr;
        align-items: start;
    }

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

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

    .home-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .financial-filter {
        grid-template-columns: 1fr;
    }

    .financial-filter-submit {
        width: 100%;
    }

    .financial-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .home-list-row {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
        padding: 12px 0;
    }

    .home-list-row .table-action {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }

    .home-list-row .quantity-pill-labeled {
        grid-column: 2;
        justify-self: start;
        margin-top: 6px;
    }

    .form-actions {
        justify-content: stretch;
        flex-direction: column-reverse;
    }

    .form-actions > * {
        width: 100%;
    }

    .order-items-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .order-item-row {
        grid-template-columns: 1fr;
    }

    .order-remove-item {
        width: 100%;
        justify-content: center;
    }

    .announcement-modal-backdrop {
        align-items: end;
        padding: 14px;
    }

    .announcement-modal {
        padding: 20px;
    }

    .announcement-modal-content h2 {
        font-size: 21px;
    }
}

@media (max-width: 520px) {
    .header-brand span {
        max-width: 120px;
        font-size: 12px;
    }

    .header-right {
        gap: 8px;
    }

    .user-chip {
        padding-right: 8px;
    }

    .ghost-button {
        width: 36px;
        min-width: 36px;
    }

    .login-heading h1,
    .page-heading h1 {
        font-size: 24px;
    }
}

.announcement-table td small {
    max-width: 520px;
    white-space: normal;
}

.is-muted {
    opacity: 0.48;
}

.announcement-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(21, 21, 21, 0.42);
}

.announcement-modal {
    width: min(100%, 560px);
    display: grid;
    gap: 18px;
    border-radius: var(--radius);
    border: 1px solid rgba(21, 21, 21, 0.10);
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 24px;
}

.announcement-modal-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--black);
}

.announcement-modal-content {
    display: grid;
    gap: 8px;
}

.announcement-modal-content h2 {
    margin: 0;
    color: var(--black);
    font-size: 24px;
    line-height: 1.2;
}

.announcement-modal-content p:last-child {
    margin: 0;
    color: var(--gray-700);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.announcement-modal form {
    display: grid;
}

.announcement-modal-close {
    justify-content: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
