:root {
    --bg: #f3efe7;
    --ink: #182028;
    --muted: #68727d;
    --line: rgba(24, 32, 40, 0.12);
    --panel: rgba(255, 252, 247, 0.82);
    --panel-strong: #fffaf2;
    --accent: #c44d2c;
    --accent-deep: #8f2912;
    --primary: #24566a;
    --primary-deep: #153d4d;
    --primary-soft: rgba(36, 86, 106, 0.11);
    --success: #53704a;
    --success-soft: rgba(83, 112, 74, 0.12);
    --navy: #1f3a52;
    --olive: #667247;
    --warning: #a25a11;
    --danger: #a13434;
    --danger-soft: rgba(161, 52, 52, 0.09);
    --shadow: 0 24px 60px rgba(43, 34, 22, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --button-height-small: 38px;
    --button-height-middle: 48px;
    --button-height-large: 56px;
    --button-radius-small: 12px;
    --button-radius-middle: 14px;
    --button-radius-large: 18px;
    --field-height-small: 44px;
    --field-height-middle: 54px;
    --field-height-large: 64px;
    --field-radius-small: 14px;
    --field-radius-middle: 18px;
    --field-radius-large: 22px;
    --font-ui: "Avenir Next", "Nunito Sans", "Segoe UI", sans-serif;
    --font-display: "Avenir Next", "Nunito Sans", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(196, 77, 44, 0.15), transparent 32%),
        radial-gradient(circle at right 10% bottom 10%, rgba(31, 58, 82, 0.14), transparent 26%),
        linear-gradient(180deg, #f6f1ea 0%, #efe9df 100%);
}

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

:focus-visible {
    outline: 3px solid rgba(31, 58, 82, 0.55);
    outline-offset: 3px;
}

.hidden {
    display: none !important;
}

.notification-error {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
    background: rgba(150, 46, 46, 0.07);
    font-size: 14px;
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.admin-root {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.backdrop {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(20px);
    opacity: 0.7;
}

.backdrop-one {
    width: 460px;
    height: 460px;
    top: -120px;
    right: -140px;
    background: rgba(196, 77, 44, 0.15);
}

.backdrop-two {
    width: 420px;
    height: 420px;
    bottom: -140px;
    left: -120px;
    background: rgba(31, 58, 82, 0.12);
}

.screen {
    position: relative;
    z-index: 1;
}

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

.login-card {
    width: min(100%, 460px);
    padding: 36px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

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

.locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
}

.locale-switcher-sidebar {
    justify-content: center;
    width: 100%;
}

.locale-switcher-button {
    min-width: 36px;
    border: 0;
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.locale-switcher-button.active {
    color: #fff;
    background: var(--accent);
}

.brand-pill,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-pill {
    color: var(--accent-deep);
    background: rgba(196, 77, 44, 0.12);
}

.brand-pill-short {
    display: none;
}

#login-title,
#page-title {
    margin: 16px 0 10px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

#login-title {
    font-size: clamp(34px, 5vw, 48px);
}

.screen-subtitle,
.page-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.page-subtitle:empty {
    display: none;
}

.stack-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
}

.field {
    display: grid;
    gap: 7px;
    font-size: 14px;
}

.field span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--field-radius-middle);
    padding: 0 18px;
    min-height: var(--field-height-middle);
    background: rgba(255, 255, 255, 0.84);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.3;
    resize: vertical;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 52px;
}

select::-ms-expand {
    display: none;
}

.select-control {
    position: relative;
    display: block;
    width: 100%;
}

.select-control::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    pointer-events: none;
    transform: translateY(-65%) rotate(45deg);
}

.select-control:has(select:disabled)::after {
    opacity: 0.45;
}

.field textarea {
    padding-block: 14px;
}

.field textarea[rows="2"],
.field textarea[rows="3"] {
    min-height: 96px;
}

.field textarea[rows="5"] {
    min-height: 148px;
}

.field textarea[rows="18"] {
    min-height: 320px;
    border-radius: var(--field-radius-large);
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(104, 114, 125, 0.58);
    font-weight: 400;
}

.field-small input,
.field-small select,
.field-small textarea,
.filters .field input,
.filters .field select,
.action-card .field input,
.action-card .field select,
.action-card .field textarea,
.mini-card .field input,
.mini-card .field select,
.mini-card .field textarea {
    min-height: var(--field-height-small);
    border-radius: var(--field-radius-small);
    padding-inline: 14px;
    font-size: 14px;
}

.field-middle input,
.field-middle select,
.field-middle textarea {
    min-height: var(--field-height-middle);
    border-radius: var(--field-radius-middle);
}

.field-large input,
.field-large select,
.field-large textarea {
    min-height: var(--field-height-large);
    border-radius: var(--field-radius-large);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid rgba(36, 86, 106, 0.2);
    border-color: rgba(36, 86, 106, 0.45);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 20px rgba(43, 34, 22, 0.06);
}

.field input.has-error,
.field select.has-error,
.field textarea.has-error {
    border-color: rgba(150, 46, 46, 0.45);
}

.field-error {
    color: var(--danger);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
}

.filters .field {
    gap: 6px;
}

.filters .field span {
    font-size: 13px;
}

.filters .field input,
.filters .field select {
    padding-block: 0;
}

.filters .select-control::after {
    right: 18px;
    width: 8px;
    height: 8px;
}

.filters select {
    padding-right: 42px;
}

.document-editor-form .field textarea[rows="18"] {
    min-height: 420px;
}

.date-picker-popover {
    position: absolute;
    z-index: 80;
    width: 292px;
    padding: 12px;
    border: 1px solid rgba(24, 32, 40, 0.1);
    border-radius: var(--radius-md);
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 18px 42px rgba(43, 34, 22, 0.18);
    backdrop-filter: blur(14px);
}

.date-picker-header {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    text-align: center;
}

.date-picker-header strong {
    font-size: 14px;
    text-transform: capitalize;
}

.date-picker-nav,
.date-picker-day {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.date-picker-nav {
    width: 38px;
    height: 34px;
    font-size: 24px;
    line-height: 1;
}

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

.date-picker-weekdays {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.date-picker-day,
.date-picker-empty {
    min-height: 34px;
}

.date-picker-day:hover,
.date-picker-nav:hover {
    background: rgba(196, 77, 44, 0.1);
}

.date-picker-day.active {
    color: #fff7ef;
    background: var(--primary);
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--button-height-middle);
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--button-radius-middle);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.admin-button-small {
    min-height: var(--button-height-small);
    padding: 0 14px;
    border-radius: var(--button-radius-small);
    font-size: 14px;
}

.admin-button-middle {
    min-height: var(--button-height-middle);
    padding: 0 18px;
    border-radius: var(--button-radius-middle);
    font-size: 16px;
}

.admin-button-large {
    min-height: var(--button-height-large);
    padding: 0 22px;
    border-radius: var(--button-radius-large);
    font-size: 18px;
}

.admin-button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    box-shadow: 0 12px 24px rgba(21, 61, 77, 0.2);
}

.admin-button:hover,
.nav-link:hover {
    transform: translateY(-1px);
}

.admin-button-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.52);
    border-color: var(--line);
}

.admin-button-danger {
    color: var(--danger);
    border-color: rgba(150, 46, 46, 0.22);
    background: var(--danger-soft);
}

.admin-button-link {
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--navy);
    box-shadow: none;
    font-weight: 700;
}

.admin-button-link:hover {
    color: var(--accent-deep);
}

.screen-app {
    display: block;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 24px;
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    top: 0;
    height: 100vh;
    padding: 24px 20px;
    border-right: 1px solid rgba(24, 32, 40, 0.08);
    background: rgb(252, 248, 241);
    backdrop-filter: blur(16px);
    overflow-y: auto;
    z-index: 20;
    transition:
        width 180ms ease,
        padding 180ms ease,
        transform 180ms ease;
}

.screen-app.sidebar-collapsed .sidebar {
    width: 78px;
    padding: 24px 12px;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
}

.sidebar-edge-toggle {
    position: fixed;
    top: 50%;
    left: 280px;
    z-index: 22;
    width: 34px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(24, 32, 40, 0.12);
    border-left: 0;
    border-radius: 0 999px 999px 0;
    background: rgba(255, 252, 247, 0.88);
    box-shadow: 0 12px 28px rgba(43, 34, 22, 0.14);
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        left 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.sidebar-edge-toggle:hover {
    background: rgba(255, 248, 239, 0.96);
    box-shadow: 0 16px 34px rgba(43, 34, 22, 0.17);
}

.sidebar-edge-toggle-icon {
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--accent-deep);
    border-bottom: 2px solid var(--accent-deep);
    transform: rotate(45deg);
    transition: transform 180ms ease;
}

.screen-app.sidebar-collapsed .sidebar-edge-toggle {
    left: 78px;
}

.screen-app.sidebar-collapsed .sidebar-edge-toggle-icon {
    transform: rotate(225deg);
}

.page-eyebrow {
    color: var(--muted);
}

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

.sidebar-command-button {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(24, 32, 40, 0.09);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.54);
    color: var(--muted);
    font: 500 13px/1 var(--font-ui);
    cursor: pointer;
}

.sidebar-command-button:hover {
    border-color: rgba(34, 105, 112, 0.28);
    color: var(--primary-deep);
}

.sidebar-command-button kbd {
    margin-left: auto;
    padding: 3px 6px;
    border: 1px solid rgba(24, 32, 40, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
    font: 500 10px/1 var(--font-ui);
}

.nav-count,
.mobile-nav-count {
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.nav-count {
    margin-left: auto;
    width: auto;
    min-width: 0;
    height: 24px;
    display: inline-flex;
    gap: 5px;
    padding-inline: 8px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 10px;
    white-space: nowrap;
}

.nav-count-label {
    font-weight: 550;
}

.nav-count-value {
    font-weight: 750;
}

.mobile-nav-count {
    position: absolute;
    top: 3px;
    right: calc(50% - 20px);
    min-width: 16px;
    height: 16px;
    padding-inline: 3px;
    font-size: 8px;
}

.mobile-nav-count .nav-count-label {
    display: none;
}

.nav-count.hidden,
.mobile-nav-count.hidden {
    display: none;
}

.nav-link {
    position: relative;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.nav-link-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.82;
}

.nav-link-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link.active {
    background: rgba(31, 58, 82, 0.1);
    border-color: rgba(31, 58, 82, 0.12);
    color: var(--navy);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
}

.sidebar-logout-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.sidebar-logout-button:hover {
    color: var(--danger);
    background: rgba(150, 46, 46, 0.08);
}

.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
}

.admin-modal.hidden {
    display: none;
}

.admin-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 32, 40, 0.32);
    backdrop-filter: blur(6px);
}

.admin-modal-card {
    position: relative;
    width: min(420px, 100%);
    padding: 28px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 252, 247, 0.96), rgba(246, 238, 228, 0.94)),
        radial-gradient(circle at right top, rgba(196, 77, 44, 0.12), transparent 38%);
    box-shadow: 0 28px 70px rgba(43, 34, 22, 0.22);
}

.logout-confirm-card {
    display: grid;
    gap: 14px;
    text-align: center;
}

.logout-confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 2px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: var(--danger);
    background: rgba(150, 46, 46, 0.1);
}

.logout-confirm-icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-confirm-card h2 {
    margin: 0;
    font-size: 28px;
}

.logout-confirm-card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
}

.admin-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.command-palette {
    align-items: start;
    padding-top: min(14vh, 120px);
}

.command-palette-card {
    width: min(640px, 100%);
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(252, 248, 241, 0.96);
}

.command-palette-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-inline: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.command-palette-heading kbd {
    padding: 4px 7px;
    border: 1px solid rgba(24, 32, 40, 0.1);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.6);
    font: 500 10px/1 var(--font-ui);
}

.command-search-field {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border: 1px solid rgba(34, 105, 112, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 105, 112, 0.06);
}

.command-search-field svg,
.command-result-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-search-field svg {
    color: var(--primary);
}

.command-search-field input {
    width: 100%;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
}

.command-search-field input:focus {
    box-shadow: none;
}

.command-palette-results {
    max-height: min(58vh, 520px);
    display: grid;
    gap: 3px;
    overflow-y: auto;
}

.command-result {
    width: 100%;
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.command-result.active,
.command-result:hover {
    background: var(--primary-soft);
}

.command-result-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.68);
    color: var(--primary-deep);
}

.command-result-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.command-result-copy strong,
.command-result-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-result-copy strong {
    font-size: 14px;
}

.command-result-copy small,
.command-result-arrow {
    color: var(--muted);
    font-size: 12px;
}

.command-empty {
    margin: 0;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.screen-app.sidebar-collapsed .sidebar .brand-pill {
    width: 54px;
    height: 54px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0;
}

.screen-app.sidebar-collapsed .sidebar .brand-pill-full {
    display: none;
}

.screen-app.sidebar-collapsed .sidebar .brand-pill-short {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 13px;
    line-height: 1;
    letter-spacing: 0.04em;
    transform: translateY(1px);
}

.screen-app.sidebar-collapsed .sidebar-header,
.screen-app.sidebar-collapsed .sidebar-footer {
    justify-content: center;
}

.screen-app.sidebar-collapsed .nav-link,
.screen-app.sidebar-collapsed .sidebar-logout-button,
.screen-app.sidebar-collapsed .sidebar-command-button {
    justify-content: center;
    padding: 13px;
}

.screen-app.sidebar-collapsed .nav-link-label,
.screen-app.sidebar-collapsed .sidebar-logout-button .nav-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.screen-app.sidebar-collapsed .sidebar-command-button .nav-link-label,
.screen-app.sidebar-collapsed .sidebar-command-button kbd {
    display: none;
}

.screen-app.sidebar-collapsed .sidebar-command-button {
    min-height: 46px;
}

.screen-app.sidebar-collapsed .nav-count {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding-inline: 3px;
    display: inline-grid;
    gap: 0;
    background: var(--danger);
    color: #fff;
    font-size: 8px;
}

.screen-app.sidebar-collapsed .nav-count-label {
    display: none;
}

.content {
    padding: 28px 28px 28px 308px;
    min-width: 0;
}

.screen-app.sidebar-collapsed .content {
    padding-left: 106px;
}

.mobile-topbar {
    display: none;
}

.mobile-section-tabs,
.mobile-bottom-nav {
    display: none;
}

.mobile-topbar-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-back-button {
    width: 30px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--navy);
    font: inherit;
    cursor: pointer;
}

.header-back-button span {
    width: 13px;
    height: 13px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateX(2px) rotate(45deg);
    font-size: 0;
    line-height: 0;
}

.header-back-button:hover {
    background: rgba(31, 58, 82, 0.08);
}

.mobile-page-title {
    min-width: 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-button {
    width: 54px;
    height: 54px;
    position: relative;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(24, 32, 40, 0.1);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 248, 239, 0.58)),
        radial-gradient(circle at 30% 20%, rgba(196, 77, 44, 0.18), transparent 45%);
    box-shadow: 0 12px 28px rgba(43, 34, 22, 0.11);
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease;
}

.menu-button:hover {
    border-color: rgba(196, 77, 44, 0.2);
    box-shadow: 0 16px 34px rgba(43, 34, 22, 0.14);
    transform: translateY(-1px);
}

.menu-button:active {
    transform: translateY(0) scale(0.98);
}

.menu-button-line {
    width: 22px;
    height: 2px;
    position: absolute;
    border-radius: 999px;
    background: var(--accent-deep);
    transition: transform 180ms ease;
}

.menu-button-line:first-child {
    transform: translateY(-5px);
}

.menu-button-line:last-child {
    transform: translateY(5px);
}

.profile-menu-icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--accent-deep);
}

.mobile-menu-open .menu-button-line:first-child {
    transform: rotate(45deg);
}

.mobile-menu-open .menu-button-line:last-child {
    transform: rotate(-45deg);
}

.content-header {
    display: contents;
}

.content-header > div:first-of-type {
    display: none;
}

.page-eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.banner {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(150, 46, 46, 0.15);
    background: rgba(150, 46, 46, 0.08);
    color: var(--danger);
}

.banner-success {
    border-color: rgba(102, 114, 71, 0.18);
    background: rgba(102, 114, 71, 0.1);
    color: var(--olive);
}

.pull-refresh-indicator {
    --pull-refresh-offset: 0px;
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.92);
    box-shadow: 0 12px 28px rgba(43, 34, 22, 0.14);
    backdrop-filter: blur(12px);
    color: var(--ink);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(-120% + var(--pull-refresh-offset)));
    transition: opacity 160ms ease, transform 180ms ease;
}

.pull-refresh-indicator.visible {
    opacity: 1;
}

.pull-refresh-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(24, 32, 40, 0.16);
    border-top-color: var(--accent);
    border-radius: 50%;
}

.pull-refresh-indicator.refreshing .pull-refresh-spinner {
    animation: pull-refresh-spin 0.85s linear infinite;
}

@keyframes pull-refresh-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.view {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}

.view.is-refreshing {
    pointer-events: none;
}

.view.is-refreshing::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    background-size: 45% 100%;
    animation: loading-sweep 900ms linear infinite;
}

@keyframes loading-sweep {
    from { background-position: -70% 0; }
    to { background-position: 170% 0; }
}

.profile-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: calc(100vh - 96px);
}

.profile-card {
    min-height: 0;
}

.profile-account-card {
    display: grid;
    gap: 18px;
}

.profile-account-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.profile-account-name {
    margin: 6px 0 0;
    font-size: 34px;
    line-height: 1;
}

.profile-account-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-account-meta div {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.48);
}

.profile-account-meta span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-account-meta strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.profile-language-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.profile-locale-switcher {
    width: fit-content;
    flex-shrink: 0;
}

.profile-logout-area {
    display: none;
}

.profile-logout-button {
    width: 100%;
    justify-content: center;
    padding-block: 16px;
    font-size: 18px;
}

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

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

.dashboard-command-center {
    position: relative;
    display: grid;
    gap: 22px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid rgba(36, 86, 106, 0.13);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(125deg, rgba(255, 252, 247, 0.96), rgba(238, 245, 245, 0.88)),
        radial-gradient(circle at 88% 0%, rgba(36, 86, 106, 0.18), transparent 38%);
    box-shadow: 0 22px 54px rgba(31, 58, 82, 0.12);
}

.dashboard-command-center::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -110px;
    top: -150px;
    border: 1px solid rgba(196, 77, 44, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(196, 77, 44, 0.035), 0 0 0 68px rgba(36, 86, 106, 0.025);
    pointer-events: none;
}

.dashboard-command-copy {
    position: relative;
    z-index: 1;
}

.dashboard-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-command-copy h2 {
    margin: 0;
    font-size: clamp(26px, 3.4vw, 42px);
    letter-spacing: -0.035em;
}

.dashboard-command-copy p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}

.dashboard-priority-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.priority-metric {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "icon label value"
        "icon note arrow";
    align-items: center;
    gap: 3px 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 18px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(31, 58, 82, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.priority-metric:hover,
.priority-metric:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(36, 86, 106, 0.28);
    box-shadow: 0 14px 30px rgba(31, 58, 82, 0.11);
}

.priority-metric-icon {
    grid-area: icon;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--primary);
    background: var(--primary-soft);
}

.priority-metric-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.priority-metric-label {
    grid-area: label;
    min-width: 0;
    font-size: 13px;
    font-weight: 650;
}

.priority-metric-value {
    grid-area: value;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.04em;
}

.priority-metric-note {
    grid-area: note;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-metric-arrow {
    grid-area: arrow;
    color: var(--muted);
}

.priority-metric-warning:not(.is-clear) .priority-metric-icon {
    color: var(--warning);
    background: rgba(162, 90, 17, 0.11);
}

.priority-metric-danger:not(.is-clear) .priority-metric-icon {
    color: var(--danger);
    background: var(--danger-soft);
}

.priority-metric.is-clear {
    opacity: 0.7;
}

.dashboard-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.dashboard-health-metric small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-health-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-health-metric {
    display: grid;
    align-content: center;
    min-height: 82px;
    padding: 12px;
    border: 1px solid rgba(24, 32, 40, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.45);
}

.dashboard-health-metric > span {
    color: var(--muted);
    font-size: 12px;
}

.dashboard-health-metric strong {
    margin-top: 2px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.metric-card,
.panel,
.placeholder-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.metric-card {
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.metric-label {
    color: var(--muted);
    font-size: 14px;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.panel {
    padding: 22px;
    min-width: 0;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-title {
    margin: 0;
    font-size: 20px;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.panel-header.compact {
    margin-bottom: 14px;
}

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

.filters-extended {
    align-items: end;
}

.field-span-2 {
    grid-column: span 2;
}

.actions-inline {
    min-width: 220px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.orders-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.95fr);
    gap: 20px;
    align-items: start;
}

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

.users-list-panel {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.users-snippet-list,
.users-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.users-edit-layout {
    min-height: calc(100vh - 156px);
    align-items: stretch;
}

.users-toolbar {
    margin-bottom: 8px;
}

.users-toolbar-header {
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}

.users-toolbar-header .admin-button {
    margin-left: auto;
}

.user-snippet {
    cursor: pointer;
}

.user-snippet .document-snippet-footer .admin-button-link {
    font-weight: 400;
}

.plans-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: 20px;
    align-items: start;
}

.plans-list-panel {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.plans-snippet-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.plans-toolbar {
    margin-bottom: 8px;
}

.plans-toolbar-header {
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
}

.plans-toolbar-header .admin-button {
    margin-left: auto;
    flex-shrink: 0;
    min-height: 42px;
    padding: 0 16px;
    font-size: 16px;
}

.panel-header-inline {
    align-items: center;
}

.plan-snippet .document-snippet-main h4,
.plan-snippet .document-snippet-main p,
.user-snippet .document-snippet-main h4,
.user-snippet .document-snippet-main p {
    max-width: calc(100% - 56px);
}

.plan-detail-actions,
.user-detail-actions {
    justify-content: flex-end;
}

.plan-detail-actions {
    justify-content: flex-start;
    align-items: center;
}

.plan-detail-actions .admin-button-link {
    margin-left: auto;
    font-weight: 400;
}

.user-detail-actions {
    justify-content: flex-start;
    align-items: center;
}

.user-detail-actions .admin-button {
    flex: 0 0 auto;
}

.user-detail-actions .admin-button-link {
    font-weight: 400;
}

.user-snippet-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.user-snippet-danger-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    margin-right: auto;
}

.user-snippet-actions-row > .admin-button-link {
    margin-left: auto;
    flex: 0 0 auto;
}

.documents-list-panel {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.access-list-panel,
.orders-list-panel,
.audit-list-panel {
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.workspace-filter-shell {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-lg);
    background: rgba(255, 252, 247, 0.62);
    box-shadow: 0 10px 28px rgba(43, 34, 22, 0.055);
    backdrop-filter: blur(12px);
}

.workspace-toolbar {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.workspace-heading {
    min-width: 0;
}

.workspace-attention-context {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 7px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

.workspace-attention-context > span {
    color: var(--navy);
    font-weight: 650;
}

.workspace-attention-context > strong {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding-inline: 6px;
    border-radius: 999px;
    background: rgba(194, 122, 29, 0.13);
    color: #8a5310;
    font-size: 12px;
}

.workspace-attention-context > small {
    font-size: 11px;
}

.quick-filter-row {
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.quick-filter-chip {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid rgba(24, 32, 40, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--muted);
    font: 500 13px/1 var(--font-ui);
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.quick-filter-chip-count {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding-inline: 5px;
    border-radius: 999px;
    background: rgba(31, 58, 82, 0.08);
    color: currentColor;
    font-size: 10px;
    font-weight: 750;
}

.quick-filter-chip:hover,
.quick-filter-chip:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 42%, transparent);
    color: var(--primary-deep);
    outline: none;
    transform: translateY(-1px);
}

.quick-filter-chip.active {
    border-color: transparent;
    background: var(--primary-soft);
    color: var(--primary-deep);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
    font-weight: 700;
}

.quick-filter-chip.tone-warning.active {
    background: rgba(194, 122, 29, 0.13);
    color: #8a5310;
}

.quick-filter-chip.tone-danger.active {
    background: var(--danger-soft);
    color: var(--danger);
}

.quick-filter-chip.tone-success.active {
    background: var(--success-soft);
    color: var(--success);
}

.filter-disclosure {
    min-width: 0;
    max-width: 100%;
    border-top: 1px solid rgba(24, 32, 40, 0.07);
}

.filter-disclosure > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--navy);
    font: 600 14px/1 var(--font-ui);
    cursor: pointer;
    list-style: none;
}

.filter-disclosure > summary::-webkit-details-marker {
    display: none;
}

.filter-disclosure > summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 160ms ease;
}

.filter-disclosure[open] > summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
}

.filter-summary-hint {
    margin-left: auto;
    color: var(--muted);
    font-weight: 400;
}

.filter-count {
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 11px;
}

.filter-disclosure .filters {
    margin: 4px 0 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 32, 40, 0.06);
}

.section-list-header {
    margin-bottom: 12px;
}

.section-list-header .panel-title {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.section-list-header .panel-title span {
    color: var(--muted);
    font-size: 0.72em;
    font-weight: 500;
}

.documents-snippet-list,
.orders-snippet-list,
.access-snippet-list,
.audit-snippet-list,
.documents-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}

.document-snippet {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    max-width: 100%;
    padding: 22px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.68), rgba(255, 251, 245, 0.44)),
        radial-gradient(circle at right top, rgba(196, 77, 44, 0.08), transparent 36%);
    box-shadow: 0 8px 18px rgba(43, 34, 22, 0.045);
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.document-snippet[data-expanded="true"] {
    cursor: default;
}

[data-snippet-toggle-region] {
    cursor: pointer;
}

[data-snippet-toggle-region]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary) 68%, transparent);
    outline-offset: 4px;
}

.document-snippet:hover,
.document-snippet:focus-visible {
    border-color: rgba(196, 77, 44, 0.24);
    box-shadow: 0 10px 22px rgba(43, 34, 22, 0.07);
    transform: translateY(-1px);
    outline: none;
}

.document-edit-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--accent-deep);
    font-size: 20px;
    box-shadow: 0 10px 24px rgba(43, 34, 22, 0.1);
    cursor: pointer;
}

.edit-icon-svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.document-snippet-main {
    min-width: 0;
    max-width: 100%;
    padding-right: 58px;
}

.document-snippet-main h4 {
    margin: 4px 0 8px;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.08;
}

.snippet-title-row {
    min-width: 0;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
}

.snippet-title-row h4 {
    min-width: 0;
    margin: 0 auto 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.snippet-title-statuses {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin: 7px 0 9px;
    white-space: nowrap;
}

.snippet-title-statuses .status-badge {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 5px 9px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

.snippet-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.snippet-card-top .document-snippet-main {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0;
}

.access-snippet .snippet-card-top {
    padding-right: 56px;
}

.workflow-cue {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(31, 58, 82, 0.07);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.workflow-cue.tone-primary {
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.workflow-cue.tone-warning {
    background: rgba(194, 122, 29, 0.13);
    color: #8a5310;
}

.workflow-cue.tone-success {
    background: var(--success-soft);
    color: var(--success);
}

.snippet-timestamp {
    color: var(--muted);
    font-size: 12px;
}

@media (min-width: 1180px) {
    .orders-snippet-list,
    .access-snippet-list,
    .plans-snippet-list,
    .users-snippet-list,
    .documents-snippet-list,
    .audit-snippet-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .order-snippet.is-expanded,
    .access-snippet.is-expanded,
    .plan-snippet.expanded,
    .user-snippet.expanded,
    .documents-snippet-list .document-snippet.expanded,
    .audit-snippet.is-expanded {
        grid-column: 1 / -1;
    }
}

.document-snippet-main p,
.document-snippet-meta {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.document-snippet-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.access-snippet .document-snippet-meta,
.audit-snippet .document-snippet-meta {
    padding-right: 58px;
}

.snippet-customer-name,
.snippet-customer-email,
.snippet-tariff {
    margin: 0;
}

.snippet-customer-name {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.snippet-customer-email {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.snippet-tags-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
}

.snippet-tags-row > * {
    flex: 0 0 auto;
}

.snippet-tariff {
    color: var(--muted);
    font-size: 16px;
}

.snippet-bottom-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.snippet-price {
    color: var(--muted);
    font-size: 16px;
}

.snippet-bottom-row .admin-button-link {
    flex: 0 0 auto;
    font-weight: 400;
}

.audit-snippet .document-snippet-main h4 {
    text-transform: none;
}

.access-snippet-details {
    cursor: default;
}

.access-history-inline {
    padding: 14px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.48);
}

.access-editor-inline {
    display: grid;
    gap: 12px;
}

.snippet-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.snippet-action-group {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-width: 0;
}

.snippet-action-row > .admin-button-link {
    flex: 0 0 auto;
    margin-left: auto;
    font-weight: 400;
}

.snippet-collapse-row {
    justify-content: flex-end;
}

.audit-date-field {
    min-width: 0;
}

.orders-date-field {
    min-width: 0;
}

.order-snippet-details {
    cursor: default;
}

.order-detail-tabs {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
    scrollbar-width: none;
}

.order-detail-tabs::-webkit-scrollbar {
    display: none;
}

.order-detail-tab {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: 500 13px/1 var(--font-ui);
    cursor: pointer;
}

.order-detail-tab:hover,
.order-detail-tab:focus-visible {
    color: var(--primary-deep);
    outline: none;
}

.order-detail-tab.active {
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-weight: 700;
}

.order-snippet.is-expanded > .snippet-action-row {
    position: sticky;
    top: 78px;
    z-index: 6;
    padding-block: 4px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: blur(12px);
}

.documents-filters {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) auto minmax(280px, auto);
    align-items: end;
}

.documents-active-filter {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: var(--button-height-middle);
    white-space: nowrap;
}

.documents-active-filter span {
    color: var(--muted);
}

.documents-filters .actions-inline {
    min-width: 0;
}

.documents-filters .actions-inline .button-row {
    justify-content: flex-end;
}

.document-snippet-footer {
    display: flex;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-end;
}

.document-snippet-footer .admin-button-link {
    font-weight: 400;
}

.document-snippet-footer.user-snippet-actions-row {
    justify-content: space-between;
    align-items: center;
}

.document-snippet-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    min-width: 0;
    max-width: 100%;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 32, 40, 0.08);
}

.document-detail-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}

.document-inline-fact {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

.document-inline-fact span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-inline-fact strong {
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.document-public-link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.46);
}

.document-public-link-hint {
    display: grid;
    gap: 4px;
}

.document-public-link-hint span {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-public-link-hint strong {
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.document-public-link-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

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

.document-text-details {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.52);
}

.document-text-label {
    color: var(--accent-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.document-text-details pre {
    margin: 0;
    max-height: 420px;
    padding: 0;
    overflow: auto;
    color: var(--muted);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
}

.documents-empty {
    padding: 18px;
    border: 1px dashed rgba(24, 32, 40, 0.12);
    border-radius: var(--radius-md);
}

.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 24px;
    border: 1px dashed rgba(24, 32, 40, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.34);
    color: var(--muted);
    text-align: center;
}

.empty-state-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 3px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.empty-state-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.empty-state strong {
    color: var(--ink);
    font-size: 16px;
}

.empty-state > span:not(.empty-state-icon) {
    font-size: 13px;
}

.empty-state .admin-button {
    margin-top: 6px;
}

.document-editor-form {
    display: grid;
    gap: 16px;
}

.document-preview {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.document-preview h4 {
    margin: 0;
}

.document-preview pre {
    max-height: 360px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.5);
    color: var(--muted);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: pre-wrap;
}

.document-active-field,
.documents-active-filter {
    align-self: end;
}

.export-filters {
    margin-top: 18px;
    margin-bottom: 0;
}

.exports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.export-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.export-card-footer {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.export-file-hint {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.export-card-footer .admin-button {
    width: 100%;
}

.export-status {
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
}

.export-status-loading {
    color: var(--navy);
}

.export-status-success {
    color: #256241;
}

.export-status-error {
    color: var(--danger);
}

.detail-panel {
    display: grid;
    gap: 20px;
}

.detail-placeholder {
    min-height: 240px;
    display: grid;
    align-content: start;
}

.detail-placeholder h3 {
    margin: 16px 0 8px;
}

.detail-kicker {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.summary-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

.summary-label {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.summary-value {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.detail-section h4 {
    margin: 0 0 14px;
    font-size: 18px;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
}

.definition-item {
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: rgba(255, 255, 255, 0.48);
}

.definition-item dt {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.definition-item dd {
    margin: 4px 0 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.empty-inline-state {
    margin: 0;
    padding: 14px;
    border: 1px dashed rgba(24, 32, 40, 0.14);
    border-radius: 14px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

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

.audit-mini-list {
    display: grid;
    gap: 8px;
}

.dashboard-audit-panel .audit-mini-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
}

.audit-mini-row {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(24, 32, 40, 0.08);
}

.audit-mini-row:first-child {
    padding-top: 0;
}

.audit-mini-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.audit-mini-head,
.audit-mini-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    justify-content: space-between;
}

.audit-mini-head strong {
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.audit-mini-head time,
.audit-mini-meta {
    color: var(--muted);
    font-size: 13px;
}

.audit-mini-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mini-card {
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: rgba(255, 255, 255, 0.48);
}

.mini-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.action-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.action-card {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: rgba(255, 255, 255, 0.48);
}

.action-card h5 {
    margin: 0 0 8px;
    font-size: 16px;
}

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

.user-editor-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.user-editor-fields-panel {
    box-shadow: none;
}

.user-editor-form .form-grid {
    gap: 7px 14px;
}

.user-editor-form .field {
    gap: 6px;
}

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

.localized-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 32, 40, 0.08);
    background: rgba(255, 255, 255, 0.44);
}

.locale-tab {
    min-width: 56px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.locale-tab.active {
    background: rgba(31, 58, 82, 0.1);
    border-color: rgba(31, 58, 82, 0.12);
    color: var(--navy);
    font-weight: 700;
}

.localized-panels {
    display: grid;
}

.locale-panel {
    display: none;
    gap: 14px;
}

.locale-panel.active {
    display: grid;
}

.locale-panel h5 {
    margin: 0;
    font-size: 16px;
}

.plan-active-field {
    min-height: 74px;
}

.plan-actions {
    margin-top: 2px;
}

.user-actions {
    margin-top: auto;
}

.user-actions .admin-button {
    width: 100%;
    justify-content: center;
}

.field-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.field-checkbox input {
    width: 20px;
    height: 20px;
    margin: 0;
}

.is-selected td {
    background: rgba(31, 58, 82, 0.06);
}

.admin-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.table-wrap {
    overflow: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(24, 32, 40, 0.08);
    min-width: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    background: rgba(255, 255, 255, 0.44);
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(24, 32, 40, 0.08);
    text-align: left;
    font-size: 14px;
}

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

.status-badge {
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 6px 10px;
}

.status-submitted,
.status-pendingpayment,
.status-receiptpending {
    color: var(--warning);
    background: rgba(162, 90, 17, 0.12);
}

.status-paid,
.status-accessgranted,
.status-receiptissued,
.status-active {
    color: var(--olive);
    background: rgba(102, 114, 71, 0.14);
}

.status-cancelled,
.status-refunded,
.status-revoked {
    color: var(--danger);
    background: rgba(150, 46, 46, 0.12);
}

.placeholder-card {
    padding: 24px;
}

.placeholder-card h3 {
    margin-top: 0;
}

.placeholder-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.muted-text {
    color: var(--muted);
}

@media (max-width: 980px) {
    :root {
        --mobile-gutter: 8px;
    }

    .workspace-filter-shell {
        padding: 14px;
    }

    .workspace-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .quick-filter-row {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .quick-filter-row::-webkit-scrollbar {
        display: none;
    }

    .document-detail-inline-list,
    .definition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .document-detail-inline-list {
        display: grid;
    }

    .document-inline-fact {
        display: grid;
        align-content: start;
        border-radius: 14px;
    }

    .screen-app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(82vw, 340px);
        height: 100vh;
        border-right: 1px solid rgba(24, 32, 40, 0.08);
        border-bottom: 0;
        transform: translateX(-105%);
        transition: transform 180ms ease;
        background: rgba(252, 248, 241, 0.94);
        z-index: 40;
    }

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

    .screen-app.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .screen-app.sidebar-collapsed .sidebar {
        width: min(82vw, 340px);
        padding: 24px 20px;
        border-right: 1px solid rgba(24, 32, 40, 0.08);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(24, 32, 40, 0.28);
        backdrop-filter: blur(3px);
        z-index: 35;
    }

    .content {
        padding: 66px var(--mobile-gutter) calc(80px + env(safe-area-inset-bottom, 0px));
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .screen-app.mobile-profile-view {
        height: 100svh;
        overflow: hidden;
    }

    .screen-app.mobile-profile-view .content {
        height: 100svh;
        overflow: hidden;
        padding-bottom: 92px;
    }

    .screen-app.mobile-profile-view #profile-view {
        min-height: 0;
        overflow: hidden;
    }

    .screen-app.mobile-profile-view .profile-layout {
        min-height: 0;
        height: calc(100svh - 66px - 92px);
        overflow: hidden;
    }

    .screen-app.sidebar-collapsed .content {
        padding-left: var(--mobile-gutter);
    }

    .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0;
        padding: 10px var(--mobile-gutter) 8px;
        width: 100%;
        background:
            linear-gradient(90deg, rgba(246, 241, 234, 0.96), rgba(239, 233, 223, 0.9)),
            radial-gradient(circle at right top, rgba(196, 77, 44, 0.12), transparent 34%);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(24, 32, 40, 0.06);
    }

    .pull-refresh-indicator {
        top: 72px;
    }

    .mobile-topbar .brand-pill {
        padding: 6px 10px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .mobile-topbar-title {
        gap: 8px;
    }

    .mobile-topbar-title {
        gap: 10px;
    }

    .mobile-page-title {
        display: none;
    }

    .mobile-topbar .menu-button {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        box-shadow: 0 8px 18px rgba(43, 34, 22, 0.1);
    }

    .mobile-topbar .profile-menu-icon {
        width: 20px;
        height: 20px;
    }

    .mobile-topbar .menu-button-line {
        width: 18px;
    }

    .mobile-topbar .menu-button-line:first-child {
        transform: translateY(-4px);
    }

    .mobile-topbar .menu-button-line:last-child {
        transform: translateY(4px);
    }

    .screen-app.mobile-menu-open .mobile-topbar .menu-button-line:first-child {
        transform: rotate(45deg);
    }

    .screen-app.mobile-menu-open .mobile-topbar .menu-button-line:last-child {
        transform: rotate(-45deg);
    }

    .content-header {
        display: none;
    }

    .content-header h1 {
        display: none;
    }

    .content-header .page-subtitle {
        display: none;
    }

    .mobile-section-tabs {
        display: flex;
        gap: 8px;
        margin: 0 0 12px;
        padding: 4px;
        overflow-x: auto;
        border: 1px solid rgba(24, 32, 40, 0.08);
        border-radius: 999px;
        background: rgba(255, 252, 247, 0.58);
        box-shadow: 0 10px 24px rgba(43, 34, 22, 0.08);
        scrollbar-width: none;
    }

    .mobile-section-tabs.hidden {
        display: none;
    }

    .mobile-section-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-section-tab {
        min-height: 36px;
        padding: 0 14px;
        flex: 0 0 auto;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--muted);
        font: 600 14px/1 var(--font-ui);
        cursor: pointer;
    }

    .mobile-section-tab.active {
        background: rgba(31, 58, 82, 0.1);
        color: var(--navy);
    }

    .mobile-bottom-nav {
        position: fixed;
        left: max(8px, env(safe-area-inset-left, 0px));
        right: max(8px, env(safe-area-inset-right, 0px));
        bottom: max(8px, env(safe-area-inset-bottom, 0px));
        z-index: 32;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 4px;
        padding: 4px;
        border: 1px solid rgba(24, 32, 40, 0.08);
        border-radius: 22px;
        background:
            linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(243, 235, 224, 0.9)),
            radial-gradient(circle at right top, rgba(196, 77, 44, 0.12), transparent 45%);
        box-shadow: 0 18px 42px rgba(43, 34, 22, 0.2);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav-link {
        position: relative;
        min-width: 0;
        min-height: 48px;
        padding: 5px 4px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border: 0;
        border-radius: 15px;
        background: transparent;
        color: var(--muted);
        font: 500 11px/1.05 var(--font-ui);
        letter-spacing: -0.01em;
        cursor: pointer;
    }

    .mobile-bottom-nav-icon {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.9;
        stroke-linecap: round;
        stroke-linejoin: round;
        opacity: 0.78;
        transition:
            opacity 160ms ease,
            transform 160ms ease;
    }

    .mobile-bottom-nav-link.active {
        color: var(--accent-deep);
        background: rgba(196, 77, 44, 0.12);
        box-shadow: inset 0 0 0 1px rgba(196, 77, 44, 0.08);
        font-weight: 700;
    }

    .mobile-bottom-nav-link.active .mobile-bottom-nav-icon {
        opacity: 1;
        transform: translateY(-1px);
    }

    .screen-app.mobile-editor-view .mobile-bottom-nav,
    .screen-app.mobile-profile-view .mobile-bottom-nav {
        display: none;
    }

    .screen-app.mobile-profile-view .profile-menu-button {
        visibility: hidden;
        pointer-events: none;
    }

    .profile-logout-area {
        position: fixed;
        left: max(var(--mobile-gutter), env(safe-area-inset-left, 0px));
        right: max(var(--mobile-gutter), env(safe-area-inset-right, 0px));
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        z-index: 31;
        display: block;
        margin: 0;
    }

    .profile-logout-button {
        min-height: 52px;
        padding-block: 0;
        border-radius: 18px;
        box-shadow: 0 16px 34px rgba(150, 46, 46, 0.15);
    }

    .screen-app.mobile-profile-view .profile-logout-area {
        bottom: max(16px, env(safe-area-inset-bottom, 0px));
    }

    .sidebar-edge-toggle {
        display: none;
    }

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

    .dashboard-metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-command-center {
        gap: 16px;
        padding: 18px;
        border-radius: var(--radius-lg);
    }

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

    .priority-metric {
        padding: 13px;
    }

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

    .dashboard-health-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .metric-card {
        min-width: 0;
        padding: 14px;
        border-radius: var(--radius-md);
    }

    .metric-label {
        font-size: 12px;
        line-height: 1.35;
    }

    .dashboard-metrics-grid .metric-card {
        min-height: 92px;
        padding: 10px 6px;
    }

    .dashboard-metrics-grid .metric-value {
        font-size: 28px;
    }

    .dashboard-audit-panel .audit-mini-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .metric-value {
        font-size: 30px;
    }

    .panel {
        padding: 14px;
        border-radius: var(--radius-md);
    }

    .panel-header {
        flex-direction: column;
        gap: 12px;
    }

    .users-toolbar-header {
        flex-direction: row;
        justify-content: flex-end;
        gap: 0;
    }

    .users-toolbar-header .admin-button {
        margin-left: auto;
    }

    .plans-toolbar-header {
        flex-direction: row;
        justify-content: flex-end;
        gap: 0;
    }

    .plans-toolbar-header .admin-button {
        min-height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }

    .panel-title {
        font-size: 20px;
        line-height: 1.2;
    }

    .panel-subtitle {
        font-size: 14px;
        line-height: 1.45;
    }

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

    .filters .field,
    .filters input {
        min-width: 0;
    }

    .filters .field-span-2,
    .filters .actions-inline {
        grid-column: 1 / -1;
    }

    .audit-filters .field:nth-child(3),
    .access-filters .field-span-2 {
        grid-column: 1 / -1;
    }

    .access-filters .field:nth-child(1),
    .access-filters .actions-inline {
        grid-column: 1 / -1;
    }

    .access-filters .access-date-field {
        grid-column: span 1;
    }

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

    .orders-filters {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .orders-filters .field:nth-child(1),
    .orders-filters .field:nth-child(2),
    .orders-filters .field:nth-child(3) {
        grid-column: span 2;
    }

    .orders-filters .orders-date-field,
    .audit-filters .audit-date-field {
        grid-column: span 1;
    }

    .orders-filters .orders-date-field {
        grid-column: span 3;
    }

    .orders-filters .actions-inline {
        grid-column: 1 / -1;
    }

    .actions-inline {
        min-width: 0;
    }

    .actions-inline .button-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .actions-inline .button-row button {
        width: 100%;
    }

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

    .documents-filters .documents-active-filter,
    .documents-filters .actions-inline {
        grid-column: 1 / -1;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .mobile-card-table,
    .audit-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 10px;
        background: transparent;
    }

    .mobile-card-table thead,
    .audit-table thead {
        display: none;
    }

    .mobile-card-table,
    .mobile-card-table tbody,
    .mobile-card-table tr,
    .mobile-card-table td,
    .audit-table,
    .audit-table tbody,
    .audit-table tr,
    .audit-table td {
        display: block;
        width: 100%;
    }

    .mobile-card-table tr,
    .audit-table tr {
        padding: 12px;
        border: 1px solid rgba(24, 32, 40, 0.08);
        border-radius: var(--radius-md);
        background: rgba(255, 255, 255, 0.58);
    }

    .mobile-card-table td,
    .audit-table td {
        display: flex;
        justify-content: space-between;
        gap: 14px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(24, 32, 40, 0.06);
        text-align: right;
        word-break: break-word;
    }

    .mobile-card-table td::before,
    .audit-table td::before {
        content: attr(data-label);
        flex: 0 0 86px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-align: left;
        text-transform: uppercase;
    }

    .mobile-card-table td:not([data-label])::before,
    .audit-table td:not([data-label])::before {
        display: none;
    }

    .mobile-card-table td:not([data-label]),
    .audit-table td:not([data-label]) {
        display: block;
        text-align: left;
    }

    .mobile-card-table td:last-child,
    .audit-table td:last-child {
        border-bottom: 0;
    }

    .detail-panel {
        gap: 14px;
    }

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

    .summary-card,
    .definition-item,
    .mini-card,
    .action-card {
        padding: 12px;
    }

    .orders-layout {
        grid-template-columns: 1fr;
    }

    .users-layout {
        grid-template-columns: 1fr;
    }

    .plans-layout {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {
    .workspace-filter-shell {
        gap: 10px;
        padding: 12px;
        border-radius: 18px;
    }

    .workspace-toolbar {
        gap: 11px;
    }

    .quick-filter-row {
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .workspace-toolbar .detail-kicker {
        font-size: 10px;
    }

    .quick-filter-chip {
        min-height: 31px;
        padding-inline: 11px;
        font-size: 12px;
    }

    .filter-summary-hint {
        display: none;
    }

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

    .orders-filters .field:nth-child(1),
    .orders-filters .field:nth-child(2) {
        grid-column: span 1;
    }

    .orders-filters .field:nth-child(3),
    .orders-filters .field-span-2,
    .orders-filters .actions-inline {
        grid-column: 1 / -1;
    }

    .orders-filters .orders-date-field {
        grid-column: span 1;
    }

    .filters .field,
    .filters .select-control,
    .filters select,
    .filters input,
    .filters .button-row,
    .filters .admin-button {
        min-width: 0;
        max-width: 100%;
    }

    .filters .admin-button {
        padding-inline: 9px;
        font-size: 12px;
        white-space: normal;
    }

    .order-snippet,
    .access-snippet {
        gap: 10px;
        padding: 15px;
    }

    .order-snippet .document-snippet-main h4,
    .access-snippet .document-snippet-main h4 {
        margin: 1px 0 5px;
        font-size: 19px;
    }

    .order-snippet .snippet-title-row,
    .access-snippet .snippet-title-row {
        gap: 6px;
    }

    .order-snippet .snippet-card-top,
    .access-snippet .snippet-card-top {
        gap: 6px;
    }

    .order-snippet .snippet-title-row h4,
    .access-snippet .snippet-title-row h4 {
        flex: 1 1 auto;
    }

    .order-snippet .snippet-title-statuses,
    .access-snippet .snippet-title-statuses {
        gap: 4px;
        margin: 6px 0 7px;
    }

    .access-snippet .snippet-title-row h4 {
        font-size: 18px;
        letter-spacing: -0.02em;
    }

    .order-snippet .snippet-customer-name,
    .order-snippet .snippet-customer-email,
    .access-snippet .snippet-customer-name,
    .access-snippet .snippet-customer-email {
        font-size: 13px;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .workflow-cue {
        min-height: 24px;
        padding: 4px 7px;
        font-size: 9px;
    }

    .access-snippet .snippet-card-top {
        padding-right: 44px;
    }

    .order-snippet .status-badge,
    .access-snippet .status-badge {
        min-height: 24px;
        padding: 4px 7px;
        font-size: 9px;
    }

    .order-snippet .snippet-tags-row,
    .access-snippet .snippet-tags-row {
        gap: 8px;
        font-size: 13px;
    }

    .order-snippet .snippet-price,
    .access-snippet .snippet-price {
        font-size: 13px;
    }

    .order-snippet .document-edit-icon,
    .access-snippet .document-edit-icon {
        top: 13px;
        right: 13px;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 17px;
    }
    .screen-login {
        padding: 18px;
    }

    .view {
        gap: 14px;
    }

    .login-card {
        padding: 24px;
    }

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

    .profile-layout {
        min-height: calc(100vh - 86px);
    }

    .profile-account-card {
        gap: 12px;
    }

    .profile-account-main {
        align-items: flex-start;
    }

    .profile-account-name {
        font-size: 30px;
    }

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

    .dashboard-command-copy h2 {
        font-size: 26px;
    }

    .dashboard-command-copy p {
        font-size: 13px;
    }

    .priority-metric {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon value"
            "label label"
            "note arrow";
        align-items: center;
    }

    .priority-metric-value {
        justify-self: end;
    }

    .dashboard-health-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-health-metric {
        min-height: 76px;
        padding: 9px;
    }

    .dashboard-health-metric strong {
        font-size: 21px;
    }

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

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

    .users-edit-layout {
        min-height: calc(100svh - 86px);
    }

    .user-editor-form {
        min-height: calc(100svh - 86px);
    }

    .user-editor-form .user-actions {
        position: fixed;
        left: var(--mobile-gutter);
        right: var(--mobile-gutter);
        bottom: max(16px, env(safe-area-inset-bottom));
        z-index: 24;
    }

    .users-edit-layout {
        padding-bottom: 104px;
    }

    .button-row,
    .detail-statuses,
    .mini-card-head,
    .field-checkbox {
        flex-direction: column;
        align-items: stretch;
    }

    .documents-active-filter {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
    }

    .document-snippet {
        padding: 18px;
    }

    .document-snippet-main h4 {
        font-size: 20px;
    }

    .document-public-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .document-detail-inline-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .document-inline-fact {
        min-width: 0;
        display: grid;
        align-content: start;
        gap: 3px;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .document-inline-fact span {
        font-size: 9px;
    }

    .document-inline-fact strong {
        font-size: 12px;
    }

    .snippet-action-row {
        justify-content: space-between;
    }

    .snippet-action-group .admin-button {
        flex: 0 1 auto;
    }

    .order-detail-tabs {
        flex-wrap: wrap;
        overflow-x: visible;
        margin-inline: -2px;
    }

    .order-detail-tab {
        min-height: 32px;
        padding-inline: 10px;
        font-size: 11px;
    }

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

    .definition-item {
        min-width: 0;
        padding: 9px 10px;
        border-radius: 12px;
    }

    .definition-item dt {
        font-size: 9px;
    }

    .definition-item dd {
        font-size: 12px;
        line-height: 1.35;
    }

    .action-stack {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .action-card {
        padding: 13px;
    }
}
