:root {
    --brand: #009241;
    --brand-strong: #00a84a;
    --brand-dark: #006b30;
    --brand-soft: rgba(0, 146, 65, 0.14);
    --bg-app: #0d1117;
    --bg-sidebar: #151a22;
    --bg-surface: #181e27;
    --bg-surface-2: #12171f;
    --bg-input: #10151c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text-main: #f3f7fb;
    --text-soft: #d6e0ea;
    --text-muted: #93a4b5;
    --danger: #ff7b72;
    --warning: #f5b83d;
    --info: #4ea8ff;
    --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 16px 34px rgba(0, 0, 0, 0.22);
    --radius: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.app-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(0, 146, 65, 0.08), transparent 32%),
        radial-gradient(circle at top right, rgba(78, 168, 255, 0.06), transparent 22%),
        var(--bg-app);
    color: var(--text-main);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.auth-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(0, 146, 65, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(78, 168, 255, 0.08), transparent 24%),
        var(--bg-app);
    color: var(--text-main);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a {
    color: inherit;
}

.app-preview-stage {
    min-height: 100vh;
}

.app-preview-shell {
    min-height: 100vh;
}

.app-preview-badge {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 146, 65, 0.2);
    background: rgba(0, 146, 65, 0.12);
    color: #d7ffe7;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 14px 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 28%),
        var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.app-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--brand-strong), var(--brand-dark));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.app-brand-title {
    color: #fff;
    font-size: 1.06rem;
    font-weight: 700;
}

.app-brand-subtitle {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.sidebar-section-title {
    padding: 0 10px;
    color: #607286;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.app-sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-soft);
    border: 1px solid transparent;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    font-size: 0.95rem;
}

.app-nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.04);
    color: #fff;
    transform: translateX(2px);
}

.app-nav-link.active {
    color: #d8ffe7;
    background: rgba(0, 146, 65, 0.14);
    border-color: rgba(0, 146, 65, 0.24);
    box-shadow: inset 3px 0 0 var(--brand-strong);
}

.app-nav-badge {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 146, 65, 0.92), rgba(78, 168, 255, 0.9));
    color: #fff;
    font-weight: 700;
}

.sidebar-utility-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.display-mode-switcher {
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.display-mode-switcher__title {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.display-mode-switcher__meta {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.display-mode-switcher__form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

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

.display-mode-chip,
.display-mode-switcher__auto {
    min-height: 42px;
    min-width: 42px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.display-mode-chip:hover,
.display-mode-switcher__auto:hover {
    border-color: rgba(0, 146, 65, 0.24);
    background: rgba(0, 146, 65, 0.12);
    color: #e8fff1;
}

.display-mode-chip.is-active,
.display-mode-switcher__auto.is-active {
    border-color: rgba(0, 146, 65, 0.28);
    background: rgba(0, 146, 65, 0.16);
    color: #d7ffe7;
    box-shadow: 0 0 0 1px rgba(0, 146, 65, 0.08);
}

.display-mode-switcher__auto {
    width: 100%;
    justify-content: center;
}

.display-mode-chip,
.display-mode-switcher__auto {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.traceability-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.traceability-stat__icon {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0, 146, 65, 0.12);
    color: #d7ffe7;
}

.traceability-stat__label {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.traceability-stat__value {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
}

.traceability-metric {
    height: 100%;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.traceability-metric span {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.traceability-metric strong {
    color: #fff;
    font-size: 1.12rem;
    font-weight: 800;
}

.traceability-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.traceability-log-item {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.traceability-log-item__title {
    color: #fff;
    font-weight: 700;
}

.traceability-log-item__meta {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.traceability-log-item__desc {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.traceability-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.traceability-timeline__item {
    position: relative;
    padding: 14px 16px 14px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.traceability-timeline__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 999px;
    background: var(--brand-strong);
}

.traceability-timeline__item--inventory::before {
    background: var(--info);
}

.traceability-timeline__item--money::before {
    background: var(--warning);
}

.traceability-timeline__item--audit::before {
    background: var(--danger);
}

.traceability-timeline__time {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.traceability-timeline__title {
    margin-top: 4px;
    color: #fff;
    font-weight: 700;
}

.traceability-timeline__detail {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.sidebar-utility-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #d6e0ea;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar-utility-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 28px;
    background: rgba(13, 17, 23, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
}

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

.app-topbar-copy {
    min-width: 0;
}

.app-topbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.app-topbar-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mobile-menu-toggle {
    width: 44px;
    min-width: 44px;
    padding: 0;
}

.app-mobile-drawer {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--bg-sidebar);
    color: var(--text-main);
    border-right: 1px solid var(--border);
}

.app-mobile-drawer .offcanvas-header,
.app-mobile-drawer .offcanvas-body {
    padding: 20px 18px;
}

.mobile-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.mobile-drawer-nav {
    gap: 8px;
}

.mobile-drawer-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.topbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.topbar-pill-value {
    font-weight: 700;
}

.topbar-pill.danger {
    color: #ff938a;
    border-color: rgba(255, 123, 114, 0.28);
    background: rgba(255, 123, 114, 0.08);
}

.topbar-pill.warning {
    color: #f9c75d;
    border-color: rgba(245, 184, 61, 0.24);
    background: rgba(245, 184, 61, 0.08);
}

.topbar-primary-btn {
    min-height: 44px;
}

.app-content {
    padding: 28px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 28px 24px;
    color: #718396;
    font-size: 0.88rem;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 460px);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
        var(--bg-surface);
    box-shadow: var(--shadow-xl);
}

.auth-card-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.auth-card-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 750;
}

.auth-card-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.eyebrow-text {
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.page-title,
.page-header h1,
.page-header .h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.55rem, 1.9vw, 2rem);
    font-weight: 750;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.text-muted,
.form-text {
    color: var(--text-muted) !important;
}

.card,
.panel-card,
.metric-card,
.summary-chip {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%),
        var(--bg-surface);
    box-shadow: var(--shadow-md);
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    min-height: 164px;
}

.metric-card::after {
    content: "";
    position: absolute;
    top: -42px;
    right: -42px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.metric-card-warm::after {
    background: rgba(255, 139, 107, 0.08);
}

.metric-card-blue::after {
    background: rgba(78, 168, 255, 0.08);
}

.metric-card-amber::after {
    background: rgba(245, 184, 61, 0.08);
}

.metric-card-green::after {
    background: rgba(0, 146, 65, 0.1);
}

.metric-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.metric-label {
    color: #7d92a7;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    margin-top: 10px;
    color: #fff;
    font-size: clamp(1.85rem, 2vw, 2.45rem);
    font-weight: 800;
    line-height: 1.1;
}

.metric-meta {
    margin-top: 10px;
    color: #9cb0c2;
    font-size: 0.94rem;
}

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

.summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.summary-chip {
    padding: 18px 20px;
}

.summary-chip-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.summary-chip-value {
    margin-top: 10px;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
}

.summary-chip-meta {
    margin-top: 4px;
    color: #95a6b7;
}

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

.panel-card {
    overflow: hidden;
}

.chart-panel {
    min-height: 380px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px 0;
}

.panel-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
}

.panel-header p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.panel-link {
    color: #a9bbc9;
    text-decoration: none;
    font-size: 0.92rem;
}

.panel-link:hover {
    color: #c9ffd9;
}

.panel-body {
    padding: 18px 22px 22px;
}

.panel-body canvas {
    width: 100% !important;
    min-height: 300px;
}

.rank-list,
.mini-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rank-item,
.mini-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.rank-index {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(0, 146, 65, 0.12);
    color: #8ef0b1;
    font-weight: 700;
}

.rank-content {
    min-width: 0;
    flex: 1;
}

.rank-title,
.mini-table-title {
    color: #fff;
    font-weight: 650;
}

.rank-subtitle,
.mini-table-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.rank-progress {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.rank-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #00b455, #62d38e);
}

.rank-metrics,
.mini-table-meta {
    text-align: right;
}

.rank-quantity {
    color: #fff;
    font-weight: 700;
}

.rank-revenue {
    margin-top: 4px;
    color: #51d07e;
    font-size: 0.88rem;
}

.mini-table-row {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    font-size: 0.84rem;
    font-weight: 700;
}

.status-thanh-cong {
    background: rgba(0, 146, 65, 0.14);
    color: #66e08d;
    border-color: rgba(0, 146, 65, 0.24);
}

.status-cho-duyet {
    background: rgba(245, 184, 61, 0.12);
    color: #f2c45b;
    border-color: rgba(245, 184, 61, 0.22);
}

.status-dang-giao {
    background: rgba(78, 168, 255, 0.12);
    color: #7ac7ff;
    border-color: rgba(78, 168, 255, 0.22);
}

.status-da-huy {
    background: rgba(255, 123, 114, 0.12);
    color: #ff938a;
    border-color: rgba(255, 123, 114, 0.22);
}

.status-neutral {
    background: rgba(255, 255, 255, 0.08);
    color: #d7e0ea;
    border-color: rgba(255, 255, 255, 0.12);
}

.status-scope-active {
    background: rgba(0, 146, 65, 0.18);
    color: #a7ffca;
    border-color: rgba(0, 146, 65, 0.3);
    box-shadow: 0 0 0 1px rgba(0, 146, 65, 0.12), 0 0 28px rgba(0, 146, 65, 0.16);
}

.status-low-stock {
    background: rgba(255, 123, 114, 0.12);
    color: #ff938a;
    border-color: rgba(255, 123, 114, 0.22);
}

.empty-state {
    padding: 28px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: center;
}

.table-responsive,
.alert,
.form-control,
.form-select,
.btn,
.badge {
    border-radius: 14px !important;
}

.table {
    color: var(--text-soft);
}

.table > :not(caption) > * > * {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom-color: rgba(255, 255, 255, 0.06);
    background: transparent !important;
}

.table-light,
.table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #9dafbf !important;
    border-color: rgba(255, 255, 255, 0.05);
}

.card-header {
    background: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.btn {
    min-height: 44px;
    border: 1px solid transparent !important;
    font-weight: 650 !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(0, 146, 65, 0.25);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand-dark)) !important;
}

.btn-outline-primary {
    color: #7fdaa1 !important;
    background: rgba(0, 146, 65, 0.08) !important;
    border-color: rgba(0, 146, 65, 0.18) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background: rgba(0, 146, 65, 0.18) !important;
    color: #d9ffe8 !important;
}

.btn-outline-secondary,
.btn-light {
    color: #d4dde6 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

.btn-outline-secondary:hover,
.btn-light:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}

.btn-outline-warning {
    color: #ffd28d !important;
    background: rgba(255, 193, 7, 0.08) !important;
    border-color: rgba(255, 193, 7, 0.18) !important;
}

.btn-outline-danger {
    color: #ff938a !important;
    background: rgba(255, 123, 114, 0.08) !important;
    border-color: rgba(255, 123, 114, 0.18) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #d94c43, #b92d25) !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(185, 45, 37, 0.22);
}

.form-control,
.form-select {
    background: var(--bg-input) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #eef5fb !important;
    min-height: 46px;
}

.form-control::placeholder {
    color: #708396 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(0, 146, 65, 0.42) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 146, 65, 0.16) !important;
}

.form-label {
    color: #dfe7ef;
    font-weight: 600;
}

.form-select option {
    background: #0f141c;
    color: #e9f1f7;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    background: var(--bg-input) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #eef5fb !important;
    border-radius: 14px !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    color: #eef5fb !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #708396 !important;
}

.select2-container--bootstrap-5 .select2-dropdown,
.select2-container--bootstrap-5 .select2-results__options {
    background: #0f141c !important;
    color: #e9f1f7 !important;
}

.select2-container--bootstrap-5 .select2-results__option--selected,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option--selectable {
    background: rgba(0, 146, 65, 0.18) !important;
    color: #f6fff9 !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: rgba(0, 146, 65, 0.42) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 146, 65, 0.16) !important;
}

.table-hover > tbody > tr:hover > * {
    color: #fff;
    background: rgba(255, 255, 255, 0.025) !important;
}

.alert-success {
    background: rgba(0, 146, 65, 0.14);
    border: 1px solid rgba(0, 146, 65, 0.22);
    color: #c6f7d8;
}

.alert-danger {
    background: rgba(255, 123, 114, 0.12);
    border: 1px solid rgba(255, 123, 114, 0.22);
    color: #ffd1cc;
}

.alert-warning {
    background: rgba(245, 184, 61, 0.12);
    border: 1px solid rgba(245, 184, 61, 0.22);
    color: #ffe9b4;
}

.badge {
    padding: 0.58rem 0.78rem !important;
    border-radius: 999px !important;
}

.badge.text-bg-success {
    background: rgba(0, 146, 65, 0.16) !important;
    color: #6ee495 !important;
}

.badge.text-bg-primary {
    background: rgba(78, 168, 255, 0.16) !important;
    color: #8dd1ff !important;
}

.badge.text-bg-danger {
    background: rgba(255, 123, 114, 0.16) !important;
    color: #ff9e95 !important;
}

.badge.text-bg-warning {
    background: rgba(245, 184, 61, 0.16) !important;
    color: #ffd56d !important;
}

.badge.text-bg-secondary,
.badge.text-bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #d7e0ea !important;
}

.invalid-feedback {
    color: #ff9e95;
}

.modal-content {
    border-radius: 22px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
        var(--bg-surface);
    color: var(--text-main);
    box-shadow: var(--shadow-xl);
}

.modal-header,
.modal-footer {
    border-color: rgba(255, 255, 255, 0.06);
}

.modal-title {
    color: #fff;
    font-weight: 700;
}

.btn-close {
    filter: invert(1) grayscale(1);
}

.display-6 {
    font-size: clamp(1.8rem, 2.2vw, 2.5rem);
}

.dashboard-header {
    margin-bottom: 18px;
}

#orderItemsTable select,
#orderItemsTable input {
    min-height: 44px;
}

#orderItemsTable .quantity-feedback {
    display: block;
}

.stock-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stock-snapshot-card {
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.stock-snapshot-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stock-snapshot-title {
    color: #fff;
    font-weight: 700;
}

.stock-snapshot-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.stock-snapshot-quantity {
    margin-top: 16px;
    color: #fff;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
}

.stock-snapshot-quantity span {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

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

.choice-card {
    display: block;
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 116px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.choice-card-body strong {
    color: #fff;
}

.choice-card-body small {
    color: var(--text-muted);
    line-height: 1.5;
}

.choice-card input:checked + .choice-card-body {
    border-color: rgba(0, 146, 65, 0.34);
    background: rgba(0, 146, 65, 0.12);
    box-shadow: 0 0 0 1px rgba(0, 146, 65, 0.1), 0 18px 34px rgba(0, 146, 65, 0.14);
    transform: translateY(-1px);
}

.choice-card-disabled {
    opacity: 0.65;
}

.choice-card-disabled .choice-card-body {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: none;
}

.partner-scope-panel {
    margin-bottom: 4px;
}

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

.payment-method-option {
    display: block;
    cursor: pointer;
}

.payment-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 120px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.payment-method-card strong {
    color: #fff;
}

.payment-method-card small {
    color: var(--text-muted);
    line-height: 1.45;
}

.payment-method-option input:checked + .payment-method-card {
    border-color: rgba(0, 146, 65, 0.34);
    background: rgba(0, 146, 65, 0.12);
    box-shadow: 0 0 0 1px rgba(0, 146, 65, 0.1), 0 18px 34px rgba(0, 146, 65, 0.14);
    transform: translateY(-1px);
}

.transfer-qr-panel,
.transfer-qr-preview {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.transfer-qr-image {
    display: block;
    max-width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #fff;
    padding: 10px;
}

.transfer-qr-copy {
    color: var(--text-soft);
}

.orders-filter-card {
    overflow: hidden;
}

.orders-mobile-list {
    display: grid;
    gap: 14px;
}

.order-mobile-card {
    border-radius: 18px;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 42%),
        var(--bg-surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.order-mobile-card__head,
.order-mobile-card__body,
.order-mobile-card__actions {
    padding: 16px 16px 0;
}

.order-mobile-card__actions {
    padding-bottom: 16px;
}

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

.order-mobile-card__code {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.order-mobile-card__submeta {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.order-mobile-card__head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.order-mobile-card__amount {
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.order-mobile-card__body {
    display: grid;
    gap: 10px;
}

.order-mobile-card__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.order-mobile-card__label {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.order-mobile-card__value {
    color: var(--text-soft);
    line-height: 1.45;
}

.order-mobile-card__note,
.order-mobile-card__tracking {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.5;
}

.order-mobile-card__actions {
    display: grid;
    gap: 10px;
}

.order-mobile-card__action-form {
    display: grid;
}

.order-items-table .stock-badge {
    min-width: 48px;
}

.mobile-order-submit {
    position: sticky;
    bottom: 12px;
    z-index: 12;
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(0, 146, 65, 0.22);
    background: rgba(13, 17, 23, 0.96);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(18px);
}

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

.mobile-order-submit__label {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mobile-order-submit__value {
    color: #fff;
    font-size: 1.28rem;
    font-weight: 800;
}

.mobile-order-submit__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 10px;
}

@media (max-width: 1399.98px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 991.98px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
        }

    .app-topbar,
    .app-content,
    .app-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-topbar {
        align-items: center;
        gap: 14px;
    }

    .app-topbar-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .app-topbar-actions::-webkit-scrollbar {
        display: none;
    }

    .topbar-pill,
    .topbar-primary-btn {
        flex: 0 0 auto;
    }

    .orders-filter-card .card-body {
        padding: 16px;
    }

    .display-mode-switcher__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .metrics-grid,
    .summary-strip {
        grid-template-columns: 1fr;
    }

    .payment-method-grid {
        grid-template-columns: 1fr;
    }

    .page-header,
    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-actions > .btn,
    .page-actions > .status-pill {
        width: 100%;
        justify-content: center;
    }

    .rank-item,
    .mini-table-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .rank-metrics,
    .mini-table-meta {
        text-align: left;
        width: 100%;
    }

    .app-topbar-title {
        font-size: 1.05rem;
    }

    .app-topbar-subtitle {
        font-size: 0.82rem;
    }

    .orders-page--form {
        padding-bottom: 110px;
    }

    .order-items-table-wrap {
        overflow: visible;
    }

    .order-items-table,
    .order-items-table thead,
    .order-items-table tbody,
    .order-items-table tr,
    .order-items-table td {
        display: block;
        width: 100%;
    }

    .order-items-table thead {
        display: none;
    }

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

    .order-items-table .order-item-row {
        display: grid;
        gap: 10px;
        padding: 14px;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.03);
    }

    .order-items-table .order-item-row td {
        padding: 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    .order-items-table .order-item-row td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--text-muted);
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .order-items-table .order-item-row .remove-row-btn {
        width: 100%;
    }

    .summary-chip {
        padding: 16px;
    }

    .summary-chip-value {
        font-size: 1.5rem;
    }

    .mobile-order-submit {
        bottom: 8px;
        margin-left: -2px;
        margin-right: -2px;
    }

    .mobile-order-submit__actions {
        grid-template-columns: 1fr;
    }

    .display-mode-switcher__grid {
        grid-template-columns: 1fr;
    }
}

body.display-preference-mobile .app-shell,
body.display-preference-tablet .app-shell {
    grid-template-columns: 1fr !important;
}

body.display-preference-mobile .app-sidebar,
body.display-preference-tablet .app-sidebar {
    display: none !important;
}

body.display-preference-mobile .mobile-menu-toggle,
body.display-preference-tablet .mobile-menu-toggle {
    display: inline-flex !important;
}

body.display-preference-mobile .app-topbar,
body.display-preference-tablet .app-topbar {
    align-items: center !important;
    gap: 14px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

body.display-preference-mobile .app-content,
body.display-preference-mobile .app-footer,
body.display-preference-tablet .app-content,
body.display-preference-tablet .app-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

body.display-preference-mobile .app-topbar-actions,
body.display-preference-tablet .app-topbar-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
    scrollbar-width: none;
}

body.display-preference-mobile .app-topbar-actions::-webkit-scrollbar,
body.display-preference-tablet .app-topbar-actions::-webkit-scrollbar {
    display: none;
}

body.display-preference-mobile .topbar-pill,
body.display-preference-mobile .topbar-primary-btn,
body.display-preference-tablet .topbar-pill,
body.display-preference-tablet .topbar-primary-btn {
    flex: 0 0 auto !important;
}

body.display-preference-mobile .orders-mobile-list {
    display: grid !important;
}

body.display-preference-mobile .data-table-card.d-none.d-lg-block,
body.display-preference-mobile .mobile-order-submit.d-none.d-lg-none {
    display: none !important;
}

body.display-preference-mobile .data-table-card.d-none.d-lg-block {
    display: none !important;
}

body.display-preference-mobile .mobile-order-submit.d-lg-none {
    display: grid !important;
}

body.display-preference-mobile .d-none.d-lg-flex {
    display: none !important;
}

body.display-preference-mobile .page-actions,
body.display-preference-mobile .page-header {
    flex-direction: column !important;
    align-items: stretch !important;
}

body.display-preference-mobile .page-actions > .btn,
body.display-preference-mobile .page-actions > .status-pill {
    width: 100% !important;
    justify-content: center !important;
}

body.display-preference-mobile .orders-page--form {
    padding-bottom: 110px;
}

body.display-preference-mobile .metrics-grid,
body.display-preference-mobile .summary-strip,
body.display-preference-mobile .dashboard-grid {
    grid-template-columns: 1fr !important;
}

body.display-preference-mobile .rank-item,
body.display-preference-mobile .mini-table-row {
    flex-direction: column !important;
    align-items: flex-start !important;
}

body.display-preference-mobile .rank-metrics,
body.display-preference-mobile .mini-table-meta {
    width: 100% !important;
    text-align: left !important;
}

body.display-preference-mobile .app-topbar-title {
    font-size: 1.05rem !important;
}

body.display-preference-mobile .app-topbar-subtitle {
    font-size: 0.82rem !important;
}

body.display-preference-mobile .order-items-table-wrap {
    overflow: visible;
}

body.display-preference-mobile .order-items-table,
body.display-preference-mobile .order-items-table thead,
body.display-preference-mobile .order-items-table tbody,
body.display-preference-mobile .order-items-table tr,
body.display-preference-mobile .order-items-table td {
    display: block !important;
    width: 100% !important;
}

body.display-preference-mobile .order-items-table thead {
    display: none !important;
}

body.display-preference-mobile .order-items-table tbody {
    display: grid !important;
    gap: 12px !important;
}

body.display-preference-mobile .order-items-table .order-item-row {
    display: grid !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

body.display-preference-mobile .order-items-table .order-item-row td {
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
}

body.display-preference-mobile .order-items-table .order-item-row td::before {
    content: attr(data-label);
    display: block !important;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.display-preference-mobile .order-items-table .order-item-row .remove-row-btn {
    width: 100% !important;
}

body.display-preference-tablet .orders-mobile-list,
body.display-preference-tablet .mobile-order-submit.d-lg-none {
    display: none !important;
}

body.display-preference-tablet .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.display-preference-tablet .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.display-preference-tablet .dashboard-grid {
    grid-template-columns: 1fr !important;
}

body.display-preference-tablet .data-table-card.d-none.d-lg-block,
body.display-preference-desktop .data-table-card.d-none.d-lg-block {
    display: block !important;
}

.audit-log-detail {
    background: rgba(10, 15, 23, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.audit-log-json {
    min-height: 180px;
    margin: 0;
    padding: 12px;
    border-radius: 12px;
    background: rgba(6, 10, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #d8e1ea;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

body.display-preference-tablet .d-none.d-lg-flex,
body.display-preference-desktop .d-none.d-lg-flex {
    display: flex !important;
}

body.display-preference-tablet .order-items-table,
body.display-preference-tablet .order-items-table thead,
body.display-preference-tablet .order-items-table tbody,
body.display-preference-tablet .order-items-table tr,
body.display-preference-tablet .order-items-table td,
body.display-preference-desktop .order-items-table,
body.display-preference-desktop .order-items-table thead,
body.display-preference-desktop .order-items-table tbody,
body.display-preference-desktop .order-items-table tr,
body.display-preference-desktop .order-items-table td {
    width: auto !important;
}

body.display-preference-tablet .order-items-table,
body.display-preference-desktop .order-items-table {
    display: table !important;
}

body.display-preference-tablet .order-items-table thead,
body.display-preference-desktop .order-items-table thead {
    display: table-header-group !important;
}

body.display-preference-tablet .order-items-table tbody,
body.display-preference-desktop .order-items-table tbody {
    display: table-row-group !important;
}

body.display-preference-tablet .order-items-table tr,
body.display-preference-desktop .order-items-table tr {
    display: table-row !important;
}

body.display-preference-tablet .order-items-table td,
body.display-preference-desktop .order-items-table td {
    display: table-cell !important;
}

body.display-preference-tablet .order-items-table .order-item-row,
body.display-preference-desktop .order-items-table .order-item-row {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

body.display-preference-tablet .order-items-table .order-item-row td::before,
body.display-preference-desktop .order-items-table .order-item-row td::before {
    display: none !important;
}

body.display-preference-desktop {
    overflow-x: auto;
}

body.display-preference-desktop .app-shell {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    min-width: 0;
    width: 100%;
}

body.display-preference-desktop .app-sidebar {
    display: flex !important;
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
}

body.display-preference-desktop .mobile-menu-toggle,
body.display-preference-desktop .orders-mobile-list,
body.display-preference-desktop .mobile-order-submit.d-lg-none {
    display: none !important;
}

body.display-preference-desktop .app-topbar {
    flex-direction: row !important;
    align-items: center !important;
    gap: 24px !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
}

body.display-preference-desktop .app-content {
    padding-left: 28px !important;
    padding-right: 28px !important;
}

body.display-preference-desktop .app-footer {
    padding-left: 28px !important;
    padding-right: 28px !important;
}

body.display-preference-desktop .app-topbar-actions {
    width: auto !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
}

@media (min-width: 992px) {
    body.display-preference-mobile .app-preview-stage,
    body.display-preference-tablet .app-preview-stage,
    body.display-preference-desktop .app-preview-stage {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding: 18px 20px 26px;
        overflow: auto;
    }

    body.display-preference-mobile .app-preview-badge,
    body.display-preference-tablet .app-preview-badge,
    body.display-preference-desktop .app-preview-badge {
        display: inline-flex;
    }

    body.display-preference-mobile .app-preview-shell,
    body.display-preference-tablet .app-preview-shell {
        width: min(100%, var(--preview-frame-width));
    }

    body.display-preference-mobile {
        --preview-frame-width: 430px;
    }

    body.display-preference-tablet {
        --preview-frame-width: 920px;
    }

    body.display-preference-mobile .app-preview-shell,
    body.display-preference-tablet .app-preview-shell {
        position: relative;
        padding: 14px;
        border-radius: 44px;
        background:
            linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
            linear-gradient(180deg, rgba(7, 10, 14, 0.94), rgba(18, 24, 32, 0.98));
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow:
            0 34px 78px rgba(0, 0, 0, 0.42),
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }

    body.display-preference-mobile .app-preview-shell::before,
    body.display-preference-tablet .app-preview-shell::before {
        content: "";
        position: absolute;
        top: 14px;
        left: 50%;
        transform: translateX(-50%);
        width: 130px;
        height: 20px;
        border-radius: 0 0 16px 16px;
        background: rgba(3, 5, 8, 0.92);
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04);
        z-index: 3;
    }

    body.display-preference-mobile .app-preview-shell::after,
    body.display-preference-tablet .app-preview-shell::after {
        content: "";
        position: absolute;
        top: 22px;
        left: 50%;
        transform: translateX(-50%);
        width: 52px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.18);
        z-index: 4;
    }

    body.display-preference-tablet .app-preview-shell--tablet::before {
        width: 150px;
        height: 18px;
        border-radius: 0 0 14px 14px;
    }

    body.display-preference-mobile .app-shell,
    body.display-preference-tablet .app-shell {
        width: 100%;
        min-height: calc(100vh - 112px);
        border-radius: 32px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow:
            0 20px 56px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.04);
        background: var(--bg-app);
    }

    body.display-preference-tablet .app-preview-shell--tablet {
        border-radius: 36px;
        padding: 12px;
    }

    body.display-preference-mobile .app-preview-shell--mobile .app-shell {
        border-radius: 28px;
    }

    body.display-preference-tablet .app-preview-shell--tablet .app-shell {
        border-radius: 24px;
    }

    body.display-preference-desktop .app-preview-shell {
        width: 100%;
    }
}
