:root {
    --shell-bg: #e9eef6;
    --shell-surface: rgba(255, 255, 255, 0.78);
    --shell-surface-strong: #ffffff;
    --shell-surface-soft: rgba(244, 248, 255, 0.88);
    --shell-sidebar: #0f223d;
    --shell-sidebar-soft: #17355d;
    --shell-border: rgba(18, 42, 74, 0.08);
    --shell-shadow: 0 18px 50px rgba(22, 48, 86, 0.10);
    --shell-shadow-soft: 0 10px 24px rgba(22, 48, 86, 0.08);
    --shell-text: #162844;
    --shell-muted: #6d7f98;
    --shell-primary: #2e6bff;
    --shell-primary-strong: #1c58eb;
    --shell-primary-soft: rgba(46, 107, 255, 0.12);
    --shell-accent: #58c0ff;
    --shell-success: #27b37e;
    --shell-warning: #f0a33a;
    --shell-danger: #ef5b6c;
    --shell-radius: 18px;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    color: var(--shell-text);
    background:
        radial-gradient(circle at top left, rgba(88, 192, 255, 0.18), transparent 22%),
        radial-gradient(circle at bottom right, rgba(46, 107, 255, 0.12), transparent 26%),
        linear-gradient(180deg, #f7faff 0%, var(--shell-bg) 100%);
}

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

.min-w-0 {
    min-width: 0;
}

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

.app-sidebar {
    width: 280px;
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 1.25rem;
    color: rgba(255, 255, 255, 0.92);
    background:
        radial-gradient(circle at top right, rgba(88, 192, 255, 0.28), transparent 20%),
        linear-gradient(180deg, #0c1d36 0%, #112948 55%, #10233f 100%);
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    z-index: 1040;
    overflow-x: hidden;
}

.app-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.35rem;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 159, 211, 0.58) rgba(255, 255, 255, 0.03);
}

.app-sidebar-scroll::-webkit-scrollbar {
    width: 10px;
}

.app-sidebar-scroll::-webkit-scrollbar-track {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.app-sidebar-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(144, 177, 228, 0.78), rgba(82, 127, 204, 0.9));
    background-clip: padding-box;
}

.app-sidebar-scroll:hover::-webkit-scrollbar-thumb,
.app-sidebar-scroll:focus-within::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(172, 203, 248, 0.92), rgba(103, 153, 238, 0.96));
    background-clip: padding-box;
}

.app-brand,
.app-user {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.app-brand-mark,
.auth-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    background: linear-gradient(135deg, #58c0ff, #2e6bff);
    box-shadow: 0 10px 30px rgba(46, 107, 255, 0.35);
}

.app-brand-label,
.auth-title {
    font-size: 1rem;
    font-weight: 700;
}

.app-brand-subtitle,
.auth-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.68);
}

.app-user-label,
.app-nav-label,
.metric-label,
.quick-card-label,
.customer-summary-label,
.workspace-label,
.detail-label,
.print-label,
.auth-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-user-label,
.app-nav-label {
    color: rgba(255, 255, 255, 0.54);
}

.app-user-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.app-user-meta {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.68);
}

.app-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.app-nav-label {
    padding: 0 0.75rem;
}

.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.92rem 1rem;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.8);
    transition: 0.2s ease;
}

.app-nav-link.is-finance {
    border: 1px solid rgba(88, 192, 255, 0.18);
}

.app-nav-link:hover,
.app-nav-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(46, 107, 255, 0.28), rgba(88, 192, 255, 0.10));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.app-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
}

.app-sidebar-footer {
    flex: 0 0 auto;
    padding-top: 0.9rem;
    margin-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    position: relative;
    z-index: 1;
}

.app-sidebar-footer form {
    margin: 0;
    pointer-events: none;
}

.app-logout {
    width: 100%;
    border: 0;
    color: #fff;
    padding: 0.78rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 91, 108, 0.84), rgba(255, 121, 83, 0.92));
    box-shadow: 0 12px 28px rgba(239, 91, 108, 0.22);
}

.app-sidebar-footer .app-logout {
    pointer-events: auto;
}

.app-sidebar-backdrop {
    display: none;
}

.app-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1.5rem;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--shell-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(18px);
    box-shadow: var(--shell-shadow);
}

.app-topbar-heading {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-topbar-subtitle {
    margin: 0.2rem 0 0;
    color: var(--shell-muted);
    font-size: 0.92rem;
}

.app-topbar-user {
    text-align: right;
}

.app-menu-toggle {
    display: none;
    min-width: 54px;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: var(--shell-primary-soft);
    color: var(--shell-primary);
    font-weight: 700;
}

.app-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.page-section,
.toolbar-card,
.data-card,
.form-card,
.workspace-preview,
.workspace-catalog,
.detail-card,
.print-stage,
.auth-card {
    border: 1px solid var(--shell-border);
    border-radius: var(--shell-radius);
    background: var(--shell-surface-strong);
    box-shadow: var(--shell-shadow);
}

.page-panel {
    padding: 1.1rem;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.page-description {
    margin: 0.35rem 0 0;
    color: var(--shell-muted);
}

.toolbar-card .card-body,
.data-card .card-body,
.form-card .card-body,
.detail-card .card-body {
    padding: 1.25rem 1.35rem;
}

.metric-grid,
.quick-grid,
.detail-grid,
.info-grid {
    display: grid;
    gap: 1rem;
}

.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.metric-card,
.quick-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--shell-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shell-shadow);
}

.metric-card {
    padding: 1.25rem;
}

.metric-card-primary {
    color: #fff;
    background: linear-gradient(135deg, #15305a, #2e6bff);
}

.metric-card-primary .metric-label,
.metric-card-primary .metric-note {
    color: rgba(255, 255, 255, 0.76);
}

.metric-value {
    margin-top: 0.55rem;
    font-size: 1.55rem;
    font-weight: 700;
}

.metric-note,
.quick-card-desc,
.detail-note,
.print-note {
    margin-top: 0.45rem;
    color: var(--shell-muted);
}

.quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.workspace-entry-grid {
    display: grid;
    gap: 1rem;
}

.workspace-entry-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(46, 107, 255, 0.12);
    border-radius: 20px;
    background: rgba(247, 250, 255, 0.88);
    box-shadow: var(--shell-shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.workspace-entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(33, 65, 112, 0.14);
}

.workspace-entry-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(135deg, #2e6bff, #58c0ff);
}

.workspace-entry-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.workspace-entry-text {
    margin: 0.25rem 0 0;
    color: var(--shell-muted);
}

.quick-card {
    display: block;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover,
.customer-card:hover,
.product-card:hover,
.mobile-record:hover,
.workspace-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(33, 65, 112, 0.14);
}

.quick-card-accent {
    color: #fff;
    background: linear-gradient(135deg, #17335b, #2a5488);
}

.quick-card-accent .quick-card-label,
.quick-card-accent .quick-card-desc {
    color: rgba(255, 255, 255, 0.75);
}

.quick-card-title {
    margin-top: 0.45rem;
    font-size: 1.14rem;
    font-weight: 700;
}

.toolbar-card {
    margin-bottom: 1rem;
}

.toolbar-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.toolbar-filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
}

.toolbar-filters-orders {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    padding-top: 1rem;
    padding-bottom: 1rem;
    color: var(--shell-muted);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom-color: rgba(22, 40, 68, 0.08);
}

.table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom-color: rgba(22, 40, 68, 0.06);
}

.record-table-card {
    overflow: hidden;
}

.mobile-stack {
    display: grid;
    gap: 1rem;
}

.mobile-record {
    border: 1px solid var(--shell-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shell-shadow-soft);
    padding: 0.85rem;
    transition: 0.2s ease;
}

.mobile-record-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.mobile-record-subtitle,
.mobile-record-meta {
    color: var(--shell-muted);
    font-size: 0.9rem;
}

.mobile-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.order-items-trigger {
    border: 0;
    cursor: pointer;
}

.order-items-trigger:hover,
.order-items-trigger:focus {
    color: #fff;
    background: linear-gradient(135deg, #2e6bff, #53a4ff);
}

.order-items-modal .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 48px rgba(20, 42, 74, 0.18);
}

.order-items-modal .modal-header {
    border-bottom-color: var(--shell-border);
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.96), #ffffff);
}

.order-items-modal .table td,
.order-items-modal .table th {
    white-space: nowrap;
}

.order-items-modal .table td.item-name {
    min-width: 160px;
    white-space: normal;
}

.empty-card {
    padding: 2.8rem 1.5rem;
    text-align: center;
    color: var(--shell-muted);
}

.form-shell {
    max-width: 920px;
    margin: 0 auto;
}

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

.form-full {
    grid-column: 1 / -1;
}

.form-footer {
    padding: 1rem 1.35rem 1.35rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--shell-border);
}

.info-banner {
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(240, 163, 58, 0.22);
    border-radius: 20px;
    color: #8a5a15;
    background: rgba(255, 245, 227, 0.88);
}

.badge-soft,
.status-pill,
.product-card-pill,
.stat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.72rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-soft,
.product-card-pill,
.stat-pill {
    color: var(--shell-primary);
    background: var(--shell-primary-soft);
}

.status-pill-success {
    color: #0d7a54;
    background: rgba(39, 179, 126, 0.15);
}

.status-pill-muted {
    color: #68788e;
    background: rgba(109, 127, 152, 0.14);
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.48fr);
    gap: 1.15rem;
    align-items: start;
}

.workspace-preview,
.workspace-catalog {
    overflow: hidden;
}

.workspace-preview {
    position: sticky;
    top: 1.5rem;
}

.workspace-panel-header {
    padding: 0.92rem 1.05rem;
    border-bottom: 1px solid var(--shell-border);
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.95), rgba(255, 255, 255, 0.88));
}

.workspace-panel-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.workspace-panel-subtitle {
    margin: 0.3rem 0 0;
    color: var(--shell-muted);
    font-size: 0.92rem;
}

.workspace-panel-body {
    padding: 0.92rem 1.05rem;
}

.workspace-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.workspace-gate {
    margin-bottom: 0.65rem;
    padding: 0.52rem 0.7rem;
    border: 1px dashed rgba(46, 107, 255, 0.18);
    border-radius: 12px;
    color: var(--shell-muted);
    background: rgba(247, 250, 255, 0.72);
    font-size: 0.76rem;
    line-height: 1.45;
}

.workspace-gate.is-active {
    color: #8a5a15;
    border-color: rgba(240, 163, 58, 0.28);
    background: rgba(255, 245, 227, 0.88);
}

.workspace-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(46, 107, 255, 0.12);
    border-radius: 999px;
    color: var(--shell-muted);
    background: rgba(247, 250, 255, 0.92);
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-chip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #2e6bff, #53a4ff);
    box-shadow: 0 10px 22px rgba(46, 107, 255, 0.22);
}

.customer-summary {
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #17335b, #2a5488);
    box-shadow: 0 20px 35px rgba(21, 48, 83, 0.24);
}

.customer-selector-wrap {
    position: relative;
}

.customer-selector {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(46, 107, 255, 0.18);
    border-radius: 20px;
    text-align: left;
    color: var(--shell-text);
    background: rgba(247, 250, 255, 0.95);
    box-shadow: var(--shell-shadow-soft);
}

.customer-selector-arrow {
    flex: 0 0 auto;
    color: var(--shell-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.customer-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 1rem;
    border: 1px solid var(--shell-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(22, 48, 86, 0.16);
}

.customer-grid-compact {
    grid-template-columns: 1fr;
    max-height: 320px;
    overflow: auto;
    margin-bottom: 0;
}

.customer-summary-compact {
    box-shadow: 0 10px 18px rgba(21, 48, 83, 0.16);
}

.customer-summary-name {
    margin-top: 0.22rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.customer-summary-meta {
    margin-top: 0.18rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.35;
    font-size: 0.8rem;
}

.workspace-summary-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
    margin: 0.7rem 0 0.8rem;
}

.stat-card {
    padding: 0.62rem 0.74rem;
    border-radius: 12px;
    background: var(--shell-surface-soft);
    border: 1px solid var(--shell-border);
}

.stat-card strong {
    display: block;
    font-size: 1rem;
}

.stat-label {
    color: var(--shell-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-value {
    margin-top: 0.35rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    max-height: calc(100vh - 390px);
    overflow: auto;
    padding-right: 0.15rem;
}

.workspace-item {
    border: 1px solid var(--shell-border);
    border-radius: 10px;
    background: rgba(247, 250, 255, 0.95);
    padding: 0.36rem 0.4rem;
    transition: 0.2s ease;
}

.workspace-item-head,
.record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
}

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

.workspace-item-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
}

.workspace-item-meta {
    margin-top: 0.12rem;
    color: var(--shell-muted);
    font-size: 0.64rem;
    line-height: 1.3;
}

.workspace-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.42rem;
    margin-top: 0.24rem;
}

.workspace-item-field {
    min-width: 0;
}

.workspace-item-field-quantity {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    flex: 1 1 auto;
}

.workspace-item-field-unit {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
}

.workspace-item-field-remark {
    margin-top: 0.24rem;
}

.workspace-mini-label {
    color: var(--shell-muted);
    font-size: 0.64rem;
    white-space: nowrap;
}

.workspace-item .form-control {
    min-height: 28px;
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
    padding-left: 0.42rem;
    padding-right: 0.42rem;
    font-size: 0.72rem;
}

.workspace-item-qty-input {
    width: 78px;
    min-width: 78px;
}

.workspace-item-unit-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    color: var(--shell-primary);
    background: rgba(46, 107, 255, 0.1);
    font-size: 0.7rem;
    line-height: 1;
}

.workspace-item-remark-input {
    width: 100%;
}

.workspace-item .btn-sm {
    padding: 0.16rem 0.46rem;
    font-size: 0.66rem;
}

.workspace-empty {
    padding: 0.8rem 0.72rem;
    text-align: center;
    color: var(--shell-muted);
    border: 1px dashed rgba(46, 107, 255, 0.18);
    border-radius: 12px;
    background: rgba(247, 250, 255, 0.78);
    font-size: 0.8rem;
}

.customer-grid,
.product-grid {
    display: grid;
    gap: 0.7rem;
}

.customer-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    margin-bottom: 0.85rem;
}

.customer-grid-search {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.product-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.product-grid.is-locked .product-card {
    opacity: 0.78;
}

.customer-card,
.product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--shell-border);
    border-radius: 16px;
    background: #fff;
    padding: 0.52rem 0.58rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.product-card.is-disabled {
    cursor: not-allowed;
    background: rgba(247, 250, 255, 0.96);
}

.product-card.is-disabled:hover {
    transform: none;
    box-shadow: var(--shell-shadow-soft);
}

.customer-card.is-active,
.product-card.is-active {
    border-color: rgba(46, 107, 255, 0.26);
    background: linear-gradient(180deg, rgba(46, 107, 255, 0.06), rgba(88, 192, 255, 0.06));
}

.customer-card-title,
.product-card-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.customer-card-meta,
.product-card-meta {
    margin-top: 0.3rem;
    color: var(--shell-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    word-break: break-word;
}

.product-card-pill {
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
}

.product-card-pill-locked {
    color: #8a5a15;
    background: rgba(240, 163, 58, 0.16);
}

.workspace-search-title {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.summary-submit {
    width: 100%;
    min-height: 46px;
}

.record-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.record-meta-chip {
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(247, 250, 255, 0.92);
    border: 1px solid var(--shell-border);
}

.record-meta-label {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--shell-muted);
    font-size: 0.74rem;
}

.record-meta-value {
    display: block;
    font-size: 0.84rem;
    line-height: 1.4;
    word-break: break-word;
}

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

.detail-grid-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.profit-estimate-shell {
    display: grid;
    gap: 1rem;
}

.profit-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.45rem 1.6rem;
    border-radius: 26px;
    box-shadow: var(--shell-shadow);
}

.profit-hero-positive {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(135deg, #133b62 0%, #1f6ca8 48%, #24b685 100%);
}

.profit-hero-negative {
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 28%),
        linear-gradient(135deg, #5d2840 0%, #a04263 48%, #ef5b6c 100%);
}

.profit-hero-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.profit-hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.78rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.88);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profit-hero-title {
    margin: 0.75rem 0 0;
    font-size: 1.75rem;
    font-weight: 800;
}

.profit-hero-description,
.profit-hero-note {
    color: rgba(255, 255, 255, 0.82);
}

.profit-hero-description {
    margin: 0.45rem 0 0;
    font-size: 1rem;
}

.profit-hero-note {
    margin-top: 0.55rem;
    font-size: 0.9rem;
}

.profit-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    min-width: 220px;
}

.profit-hero-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.82rem;
    font-weight: 700;
}

.profit-hero-amount {
    font-size: clamp(2.4rem, 4.5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.profit-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 1rem;
    align-items: stretch;
}

.profit-panel {
    overflow: hidden;
}

.profit-panel-header {
    margin-bottom: 1rem;
}

.profit-panel-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
}

.profit-panel-description {
    margin: 0.35rem 0 0;
    color: var(--shell-muted);
    line-height: 1.6;
}

.profit-quantity-grid,
.profit-metric-grid,
.profit-metric-grid.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.profit-mini-stat {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(255, 255, 255, 0.95));
}

.profit-mini-stat-label {
    color: var(--shell-muted);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profit-mini-stat-value {
    margin-top: 0.45rem;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.profit-formula-note {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border: 1px dashed rgba(46, 107, 255, 0.18);
    border-radius: 18px;
    color: var(--shell-text);
    background: rgba(247, 250, 255, 0.7);
}

.profit-formula-note p {
    line-height: 1.6;
}

.profit-inline-calc-form {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.profit-inline-input {
    min-width: 0;
    padding: 1rem 1.05rem;
    border: 1px solid var(--shell-border);
    border-radius: 18px;
    background: rgba(247, 250, 255, 0.74);
}

.profit-inline-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.profit-inline-actions .btn {
    min-width: 132px;
}

.profit-inline-actions .form-text {
    flex: 1 1 220px;
    margin: 0;
    color: var(--shell-muted);
}

.profit-inline-input .form-control {
    margin-top: 0.25rem;
    background: rgba(255, 255, 255, 0.96);
}

.profit-inline-input .form-text {
    line-height: 1.6;
    color: var(--shell-muted);
}

.profit-inline-calc-form .form-label {
    margin-bottom: 0.4rem;
}

.profit-inline-calc-form .form-text {
    font-size: 0.84rem;
}

.profit-panel-calculation .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.profit-panel-calculation .profit-inline-calc-form {
    margin-top: auto;
}

.profit-panel-quantities .card-body {
    height: 100%;
}

.profit-panel-quantities .profit-quantity-grid {
    align-items: start;
}

.detail-card-compact .card-body {
    padding: 0.8rem 0.95rem;
}

.detail-card-compact .detail-label {
    font-size: 0.72rem;
}

.detail-card-compact .detail-value {
    margin-top: 0.22rem;
    font-size: 0.88rem;
    line-height: 1.3;
    word-break: break-word;
}

.detail-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-value {
    margin-top: 0.35rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.detail-actions form {
    margin: 0;
}

.print-stage {
    padding: 1.5rem;
}

.print-hub-hero {
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--shell-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.96));
    box-shadow: var(--shell-shadow);
}

.print-hub-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin-top: 1.5rem;
}

.print-hub-toolbar-field {
    min-width: 220px;
    flex: 1 1 260px;
}

.print-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.print-hub-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.35rem;
    border-radius: 22px;
    border: 1px solid rgba(46, 107, 255, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shell-shadow-soft);
}

.print-hub-card.is-active {
    border-color: rgba(46, 107, 255, 0.22);
    background: linear-gradient(180deg, rgba(46, 107, 255, 0.05), rgba(255, 255, 255, 0.96));
}

.print-hub-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.print-hub-card-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
}

.print-hub-card-desc {
    margin: 0.35rem 0 0;
    color: var(--shell-muted);
    line-height: 1.6;
}

.print-hub-card-actions,
.print-hub-card-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.print-hub-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    color: var(--shell-primary);
    background: rgba(46, 107, 255, 0.1);
    font-size: 0.74rem;
    font-weight: 700;
}

.print-list {
    margin: 1rem 0 0;
    padding-left: 1rem;
}

.print-list li + li {
    margin-top: 0.45rem;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-shell {
    width: min(1180px, 100%);
    min-height: min(760px, calc(100vh - 3rem));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 480px);
    align-items: stretch;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 32px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 30px 80px rgba(20, 42, 74, 0.18);
    backdrop-filter: blur(18px);
}

.auth-panel {
    padding: 4rem 5vw;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(88, 192, 255, 0.18), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 255, 0.76));
}

.auth-copy {
    max-width: 560px;
}

.auth-kicker {
    color: var(--shell-primary);
}

.auth-copy h1 {
    margin: 0.9rem 0 1rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.08;
}

.auth-copy p {
    color: var(--shell-muted);
    font-size: 1.02rem;
    line-height: 1.8;
}

.auth-points {
    margin: 1.5rem 0 0;
    padding-left: 1.1rem;
    color: var(--shell-text);
}

.auth-points li + li {
    margin-top: 0.75rem;
}

.auth-card {
    margin: 1.5rem;
    align-self: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
}

.auth-card-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pagination {
    gap: 0.4rem;
}

.page-item .page-link {
    border: 1px solid var(--shell-border);
    color: var(--shell-text);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 12px;
}

.page-item.active .page-link {
    border-color: transparent;
    background: linear-gradient(135deg, #2e6bff, #53a4ff);
}

.btn {
    border-radius: 14px;
    font-weight: 600;
}

.btn-primary {
    border-color: var(--shell-primary);
    background: linear-gradient(135deg, #2e6bff, #53a4ff);
    box-shadow: 0 10px 22px rgba(46, 107, 255, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--shell-primary-strong);
    background: linear-gradient(135deg, #1c58eb, #419aff);
}

.btn-outline-primary {
    color: var(--shell-primary);
    border-color: rgba(46, 107, 255, 0.22);
    background: rgba(46, 107, 255, 0.04);
}

.btn-outline-secondary,
.btn-outline-dark,
.btn-outline-light,
.btn-outline-danger {
    border-color: var(--shell-border);
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 14px;
    border-color: rgba(21, 45, 78, 0.10);
    background: rgba(247, 250, 255, 0.88);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(46, 107, 255, 0.35);
    box-shadow: 0 0 0 0.22rem rgba(46, 107, 255, 0.10);
}

.searchable-select-native.is-enhanced {
    display: none;
}

.searchable-select {
    position: relative;
}

.searchable-select-trigger {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(21, 45, 78, 0.10);
    border-radius: 14px;
    color: var(--shell-text);
    background: rgba(247, 250, 255, 0.88);
    text-align: left;
}

.searchable-select-trigger.is-multiple {
    align-items: flex-start;
}

.searchable-select-trigger.is-empty {
    color: var(--shell-muted);
}

.searchable-select-value {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.45;
}

.searchable-select-trigger:focus {
    outline: none;
    border-color: rgba(46, 107, 255, 0.35);
    box-shadow: 0 0 0 0.22rem rgba(46, 107, 255, 0.10);
}

.searchable-select-arrow {
    flex: 0 0 auto;
    color: var(--shell-primary);
    font-size: 0.8rem;
}

.searchable-select.is-open .searchable-select-arrow {
    transform: rotate(180deg);
}

.searchable-select-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 30;
    padding: 0.7rem;
    border: 1px solid var(--shell-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(22, 48, 86, 0.16);
}

.searchable-select-input {
    width: 100%;
    min-height: 42px;
    padding: 0.6rem 0.85rem;
    border: 1px solid rgba(21, 45, 78, 0.10);
    border-radius: 12px;
    background: rgba(247, 250, 255, 0.88);
}

.searchable-select-input:focus {
    outline: none;
    border-color: rgba(46, 107, 255, 0.35);
    box-shadow: 0 0 0 0.2rem rgba(46, 107, 255, 0.08);
}

.searchable-select-list {
    display: grid;
    gap: 0.35rem;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 0.6rem;
}

.searchable-select-option,
.searchable-select-empty {
    width: 100%;
    padding: 0.62rem 0.75rem;
    border-radius: 12px;
    text-align: left;
    font-size: 0.92rem;
}

.searchable-select-option {
    border: 1px solid transparent;
    color: var(--shell-text);
    background: rgba(247, 250, 255, 0.92);
}

.searchable-select-option:hover,
.searchable-select-option.is-active {
    border-color: rgba(46, 107, 255, 0.18);
    background: rgba(46, 107, 255, 0.08);
}

.searchable-select-option.is-selected {
    color: var(--shell-primary);
    background: rgba(46, 107, 255, 0.12);
    border-color: rgba(46, 107, 255, 0.18);
}

.searchable-select-empty {
    color: var(--shell-muted);
    background: rgba(247, 250, 255, 0.72);
}

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

.admin-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-pagination-meta {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.admin-page-size-control {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--shell-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.admin-page-size-control .form-select {
    min-width: 120px;
}

.admin-pagination-links {
    margin-left: auto;
}

.admin-pagination-links .pagination {
    margin-bottom: 0;
}

.admin-page-stats {
    padding: 0.85rem 1rem;
    border: 1px solid var(--shell-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    line-height: 1.2;
}

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

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
    }

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

    .app-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1030;
        border: 0;
        background: rgba(8, 17, 31, 0.4);
    }

    body.shell-sidebar-open .app-sidebar-backdrop {
        display: block;
    }

    .app-main {
        padding: 1rem;
    }

    .app-menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .app-topbar-user {
        display: none;
    }

    .workspace-grid,
    .profit-layout-grid,
    .workspace-toolbar,
    .toolbar-grid,
    .toolbar-filters,
    .form-grid,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .profit-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .profit-hero-side {
        align-items: flex-start;
        min-width: 0;
    }

    .workspace-preview {
        position: static;
    }

    .auth-panel {
        padding-bottom: 0;
    }

    .auth-card {
        margin-top: 0;
    }
}

@media (max-width: 767.98px) {
    .page-panel,
    .workspace-panel-body,
    .workspace-panel-header,
    .form-card .card-body,
    .detail-card .card-body,
    .auth-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .metric-grid,
    .detail-grid,
    .finance-summary-grid,
    .profit-quantity-grid,
    .profit-metric-grid,
    .workspace-summary-stats,
    .workspace-item-grid,
    .record-meta-grid {
        grid-template-columns: 1fr;
    }

    .profit-hero {
        padding: 1.2rem 1rem;
    }

    .profit-hero-title {
        font-size: 1.45rem;
    }

    .profit-hero-amount {
        font-size: 2.35rem;
    }

    .admin-pagination-bar,
    .admin-pagination-meta,
    .admin-page-size-control,
    .admin-page-stats {
        align-items: stretch;
    }

    .admin-pagination-links {
        margin-left: 0;
        width: 100%;
    }

    .form-footer,
    .mobile-record-actions,
    .detail-actions {
        flex-direction: column;
    }

    .form-footer > *,
    .mobile-record-actions > *,
    .detail-actions > * {
        width: 100%;
    }
}
