body {
    min-height: 100vh;
    background: #f5f7fb;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.app-logo,
.login-logo,
.sidebar-logo {
    display: block;
    height: auto;
}

.app-logo {
    max-width: 180px;
}

.login-logo {
    max-width: 220px;
    margin-bottom: 10px;
}

.sidebar-logo {
    max-width: 160px;
}

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

.app-sidebar {
    width: 260px;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar-brand {
    font-weight: 700;
    margin-bottom: 24px;
}

.app-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.78);
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
    color: #fff;
}

.app-main {
    flex: 1;
    padding: 28px;
}

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

.metric-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

@media (max-width: 767.98px) {
    .app-shell,
    .app-topbar {
        display: block;
    }

    .app-sidebar {
        width: 100%;
    }

    .app-main {
        padding: 20px;
    }
}

.dashboard-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid #e9ecef;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.10) !important;
}

.dashboard-card .card-title {
    color: #212529;
}

.dashboard-card .card-text {
    min-height: 48px;
}

.weekly-readiness-card {
    border: 1px solid #e6eaf0;
    background: #fbfcfe;
}

.weekly-readiness-card .card-title {
    color: #172033;
    font-weight: 700;
}

.readiness-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.readiness-status {
    min-width: 160px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 8px;
}

.readiness-status .badge,
.readiness-list-card .badge {
    font-weight: 600;
}

.readiness-list-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.readiness-list-card-header {
    min-height: 46px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8edf3;
}

.readiness-list-card h6 {
    color: #172033;
    font-weight: 700;
}

.readiness-count-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.36rem 0.55rem;
    white-space: nowrap;
}

.readiness-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2px;
}

.readiness-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 42px;
    padding: 9px 0;
    border-top: 1px solid #e9eef4;
}

.readiness-list-row:first-child {
    border-top: 0;
}

.readiness-list-name {
    min-width: 0;
    flex: 1 1 auto;
    color: #273142;
    overflow-wrap: anywhere;
}

.readiness-list-row .badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    line-height: 1;
    padding: 0.38rem 0.55rem;
    min-width: 68px;
    text-align: center;
    white-space: nowrap;
}

.readiness-actions .btn {
    min-width: 150px;
}

.branch-requests-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.branch-requests-section,
.branch-request-detail-card {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.branch-requests-table-wrap {
    border-color: #dde5ee !important;
}

.branch-requests-table {
    min-width: 760px;
}

.branch-requests-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.branch-requests-table tbody td {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    vertical-align: middle;
}

.branch-request-items-table {
    min-width: 680px;
}

.branch-request-summary-card,
.branch-request-control-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.branch-request-control-card .form-label {
    color: #273142;
    font-weight: 600;
}

.branch-request-control-card .form-control,
.branch-request-control-card .form-select {
    min-height: 44px;
}

.branch-request-control-card optgroup {
    color: #485568;
    font-weight: 700;
}

.branch-request-quantity-input {
    font-size: 1rem;
}

.branch-request-quantity-cell {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.branch-request-actions .btn,
.branch-request-row-actions .btn {
    min-width: 88px;
}

.branch-request-row-actions {
    white-space: nowrap;
}

.branch-request-row-actions .btn + .btn {
    margin-left: 0.5rem;
}

.branch-request-modal-actions .btn {
    min-width: 120px;
}

.ai-price-reader-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.ai-price-reader-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.ai-price-reader-form {
    background: transparent;
}

.ai-price-reader-control-card,
.ai-price-reader-input-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.ai-price-reader-control-card .form-label,
.ai-price-reader-input-card .form-label {
    color: #273142;
    font-weight: 600;
}

.ai-price-reader-control-card .form-control,
.ai-price-reader-control-card .form-select {
    min-height: 44px;
}

.ai-price-reader-input-card textarea {
    min-height: 300px;
    font-family: Consolas, "Liberation Mono", monospace;
    line-height: 1.45;
    resize: vertical;
}

.ai-price-reader-table-wrap {
    border-color: #dde5ee !important;
}

.ai-price-reader-table {
    min-width: 1120px;
}

.ai-price-reader-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ai-price-reader-table tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.ai-price-reader-table .form-control,
.ai-price-reader-table .form-select {
    min-height: 38px;
}

.ai-price-reader-actions .btn {
    min-width: 160px;
}

.weekly-prices-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.weekly-prices-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.weekly-prices-filter-card,
.weekly-price-summary-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.weekly-prices-filter-card .form-label {
    color: #273142;
    font-weight: 600;
}

.weekly-prices-filter-card .form-control,
.weekly-prices-filter-card .form-select {
    min-height: 44px;
}

.weekly-price-summary-value {
    color: #172033;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
}

.weekly-prices-table-wrap {
    border-color: #dde5ee !important;
}

.weekly-prices-table {
    min-width: 1120px;
}

.weekly-prices-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.weekly-prices-table tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.weekly-price-row-needs-review {
    box-shadow: inset 4px 0 0 rgba(255, 193, 7, 0.65);
}

.weekly-price-row-needs-review > td {
    background: rgba(255, 243, 205, 0.34);
}

.weekly-price-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.weekly-price-row-actions {
    white-space: nowrap;
}

.weekly-price-row-actions .btn {
    min-width: 82px;
}

.weekly-price-row-actions .btn + .btn {
    margin-left: 0.5rem;
}

.weekly-prices-actions .btn {
    min-width: 96px;
}

.weekly-prices-filter-card .weekly-prices-actions {
    justify-content: flex-start;
}

.weekly-prices-action-spacer {
    color: transparent;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    user-select: none;
}

.compare-orders-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.compare-orders-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.compare-orders-control-card,
.compare-orders-summary-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.compare-orders-control-card .form-label {
    color: #273142;
    font-weight: 600;
}

.compare-orders-control-card .form-control,
.compare-orders-control-card .form-select {
    min-height: 44px;
}

.compare-orders-summary-value {
    color: #172033;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
}

.compare-orders-table-wrap {
    border-color: #dde5ee !important;
}

.compare-orders-table {
    min-width: 980px;
}

.compare-orders-results-table {
    min-width: 1120px;
}

.compare-orders-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.compare-orders-table tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.compare-orders-money,
.compare-orders-quantity {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.compare-orders-money {
    text-align: right;
}

.compare-orders-actions .btn {
    min-width: 150px;
}

.purchase-orders-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.purchase-orders-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.purchase-orders-control-card,
.purchase-orders-filter-card,
.purchase-orders-summary-card,
.purchase-order-detail-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.purchase-orders-control-card .form-label,
.purchase-orders-filter-card .form-label {
    color: #273142;
    font-weight: 600;
}

.purchase-orders-control-card .form-control,
.purchase-orders-control-card .form-select,
.purchase-orders-filter-card .form-control,
.purchase-orders-filter-card .form-select {
    min-height: 44px;
}

.purchase-orders-summary-value {
    color: #172033;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
}

.purchase-orders-table-wrap {
    border-color: #dde5ee !important;
}

.purchase-orders-table {
    min-width: 1120px;
}

.purchase-order-items-table {
    min-width: 900px;
}

.purchase-orders-table thead th,
.purchase-order-items-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.purchase-orders-table tbody td,
.purchase-order-items-table tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: middle;
}

.purchase-orders-money,
.purchase-orders-quantity {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.purchase-orders-money {
    text-align: right;
}

.purchase-orders-row-actions {
    min-width: 480px;
    white-space: nowrap;
}

.purchase-orders-actions .btn {
    min-width: 96px;
}

.purchase-order-breakdown {
    margin-top: 2px;
    color: #485568;
}

.reports-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.reports-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.reports-filter-card,
.reports-summary-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.reports-filter-card .form-label {
    color: #273142;
    font-weight: 600;
}

.reports-filter-card .form-control,
.reports-filter-card .form-select {
    min-height: 44px;
}

.reports-summary-card {
    min-height: 100%;
}

.reports-summary-group + .reports-summary-group {
    padding-top: 18px;
    border-top: 1px solid #e8edf3;
}

.reports-summary-tip {
    padding-top: 2px;
}

.reports-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.reports-savings-card {
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.reports-savings-positive {
    border-color: rgba(25, 135, 84, 0.35);
    background: #f2fbf6;
}

.reports-savings-positive .reports-summary-value {
    color: #146c43;
}

.reports-savings-neutral .reports-summary-value {
    color: #172033;
}

.reports-table-wrap {
    border-color: #dde5ee !important;
}

.reports-table {
    min-width: 860px;
    table-layout: fixed;
}

.reports-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.reports-table tbody td {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    vertical-align: middle;
}

.reports-table .reports-col-name {
    text-align: left;
    width: 28%;
    white-space: normal;
}

.reports-table .reports-col-product {
    width: 30%;
}

.reports-table .reports-col-week {
    width: 24%;
}

.reports-table .reports-col-money,
.reports-table .reports-money {
    text-align: right;
}

.reports-table .reports-col-count,
.reports-table .reports-count {
    text-align: center;
    width: 12%;
}

.reports-table .reports-col-quantity,
.reports-table .reports-quantity {
    text-align: right;
    width: 13%;
}

.reports-table .reports-col-savings,
.reports-table .reports-savings-cell {
    color: #146c43;
    font-weight: 800;
}

.reports-money,
.reports-quantity {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}

.reports-money {
    text-align: right;
}

.reports-actions .btn {
    min-width: 130px;
}

.branches-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.branches-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.branches-summary-card {
    min-height: 100%;
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.branches-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.branches-table-wrap {
    border-color: #dde5ee !important;
}

.branches-table {
    min-width: 760px;
    table-layout: fixed;
}

.branches-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.branches-table tbody td {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    vertical-align: middle;
}

.branches-table .branches-col-name {
    width: 24%;
}

.branches-table .branches-col-status {
    width: 120px;
}

.branches-row-actions {
    white-space: nowrap;
}

.branches-actions .btn {
    min-width: 130px;
}

.branches-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.branches-form-group .form-control {
    min-height: 44px;
}

.suppliers-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.suppliers-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.suppliers-summary-card {
    min-height: 100%;
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.suppliers-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.suppliers-table-wrap {
    border-color: #dde5ee !important;
}

.suppliers-table {
    min-width: 980px;
    table-layout: fixed;
}

.suppliers-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.suppliers-table tbody td {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    vertical-align: middle;
}

.suppliers-table .suppliers-col-name {
    width: 20%;
}

.suppliers-table .suppliers-col-mode {
    width: 190px;
}

.suppliers-table .suppliers-col-status {
    width: 120px;
}

.suppliers-row-actions {
    white-space: nowrap;
}

.suppliers-actions .btn {
    min-width: 130px;
}

.suppliers-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.suppliers-form-group .form-control,
.suppliers-form-group .form-select {
    min-height: 44px;
}

.suppliers-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.products-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.products-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.products-summary-card {
    min-height: 100%;
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.products-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.products-table-wrap {
    border-color: #dde5ee !important;
}

.products-table {
    min-width: 860px;
    table-layout: fixed;
}

.products-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.products-table tbody td {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    vertical-align: middle;
}

.products-table .products-col-name {
    width: 26%;
}

.products-table .products-col-category {
    width: 180px;
}

.products-table .products-col-status {
    width: 120px;
}

.products-row-actions {
    white-space: nowrap;
}

.products-actions {
    display: flex;
    gap: 0.5rem;
}

.products-actions .btn {
    min-width: 130px;
}

.products-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.products-form-group .form-control,
.products-form-group .form-select {
    min-height: 44px;
}

.products-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.products-bulk-help {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 12px 14px;
}

.products-bulk-help code {
    color: #273142;
    white-space: normal;
    overflow-wrap: anywhere;
}

.products-bulk-textarea {
    min-height: 260px;
    font-family: Consolas, "Liberation Mono", monospace;
    line-height: 1.45;
    resize: vertical;
}

.products-bulk-table {
    min-width: 1100px;
}

.products-bulk-table thead th {
    color: #485568;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.products-bulk-table tbody td {
    vertical-align: top;
}

.products-bulk-message {
    color: #5f6f85;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    max-width: 220px;
}

.products-bulk-row-invalid > td {
    background: rgba(220, 53, 69, 0.04);
}

.products-bulk-row-duplicate_existing > td,
.products-bulk-row-duplicate_input > td {
    background: rgba(255, 193, 7, 0.06);
}

.product-aliases-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.product-aliases-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.product-aliases-summary-card {
    min-height: 100%;
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 16px;
}

.product-aliases-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-aliases-table-wrap {
    border-color: #dde5ee !important;
}

.product-aliases-table {
    min-width: 1060px;
    table-layout: fixed;
}

.product-aliases-table thead th {
    color: #485568;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.product-aliases-table tbody td {
    padding-top: 0.68rem;
    padding-bottom: 0.68rem;
    vertical-align: middle;
}

.product-aliases-table .product-aliases-col-product {
    width: 22%;
}

.product-aliases-table .product-aliases-col-alias {
    width: 24%;
}

.product-aliases-table .product-aliases-col-status {
    width: 120px;
}

.product-aliases-row-actions {
    white-space: nowrap;
}

.product-aliases-actions .btn {
    min-width: 130px;
}

.product-aliases-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.product-aliases-form-group .form-control,
.product-aliases-form-group .form-select {
    min-height: 44px;
}

.product-aliases-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.product-settings-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.product-settings-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.product-settings-summary-card,
.product-settings-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
}

.product-settings-summary-card {
    min-height: 100%;
    padding: 16px;
}

.product-settings-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.product-settings-card {
    overflow: hidden;
}

.product-settings-card-header {
    background: #fff;
    border-bottom: 1px solid #dde5ee;
    padding: 14px 16px;
}

.product-settings-table-wrap {
    background: #fff;
}

.product-settings-table tbody td {
    padding: 0.68rem 0.75rem;
    vertical-align: middle;
}

.product-settings-status-cell {
    width: 110px;
}

.product-settings-row-actions {
    width: 150px;
}

.product-settings-actions .btn {
    min-width: 130px;
}

.product-settings-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.product-settings-form-group .form-control,
.product-settings-form-group .form-select {
    min-height: 44px;
}

.product-settings-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.restaurant-settings-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.restaurant-settings-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.restaurant-settings-card,
.restaurant-settings-preview-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
}

.restaurant-settings-card {
    overflow: hidden;
}

.restaurant-settings-card-header {
    background: #fff;
    border-bottom: 1px solid #dde5ee;
    padding: 16px 18px;
}

.restaurant-settings-card-body {
    padding: 18px;
}

.restaurant-settings-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.restaurant-settings-form-group .form-control {
    min-height: 44px;
}

.restaurant-settings-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.restaurant-settings-actions {
    display: flex;
    justify-content: flex-end;
}

.restaurant-settings-actions .btn {
    min-width: 140px;
}

.restaurant-settings-placeholder-warning {
    border-color: rgba(255, 193, 7, 0.45);
    margin-bottom: 18px;
}

.restaurant-settings-preview-card {
    padding: 18px;
}

.restaurant-settings-preview-title {
    color: #172033;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.restaurant-settings-preview-logo-wrap {
    display: flex;
    align-items: center;
    min-height: 82px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8edf3;
}

.restaurant-settings-preview-logo {
    max-width: 100%;
    object-fit: contain;
}

.restaurant-settings-preview-logo-placeholder {
    width: 100%;
    color: #5f6f85;
    font-size: 0.9rem;
    text-align: center;
    border: 1px dashed #c8d2df;
    border-radius: 8px;
    padding: 18px 12px;
    background: #fff;
}

.restaurant-settings-preview-name {
    color: #172033;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.restaurant-settings-preview-contact {
    color: #5f6f85;
    line-height: 1.5;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.branch-order-setup-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.branch-order-setup-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.branch-order-setup-control-card,
.branch-order-setup-form-card,
.branch-order-setup-summary-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
}

.branch-order-setup-control-card,
.branch-order-setup-form-card {
    padding: 16px;
}

.branch-order-setup-summary-card {
    min-height: 100%;
    padding: 16px;
}

.branch-order-setup-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.branch-order-setup-control-card .form-label,
.branch-order-setup-form-group .form-label {
    color: #273142;
    font-weight: 600;
}

.branch-order-setup-control-card .form-control,
.branch-order-setup-control-card .form-select,
.branch-order-setup-form-group .form-control,
.branch-order-setup-form-group .form-select {
    min-height: 44px;
}

.branch-order-setup-control-card .form-text,
.branch-order-setup-form-group .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.branch-order-setup-button-spacer {
    color: transparent;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    user-select: none;
}

.branch-order-setup-section .setup-section-card {
    background: #fff;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    overflow: hidden;
}

.branch-order-setup-section .setup-section-header {
    background: #f8fafc;
    border-bottom: 1px solid #dde5ee;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.branch-order-setup-section .setup-product-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 110px 110px 95px 150px;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f6;
}

.branch-order-setup-section .setup-product-row:last-child {
    border-bottom: 0;
}

.branch-order-setup-section .setup-product-name {
    color: #172033;
    font-weight: 700;
}

.branch-order-setup-section .setup-meta {
    color: #5f6f85;
    font-size: 0.82rem;
}

.branch-order-setup-actions .btn,
.branch-order-setup-form-actions .btn {
    min-width: 130px;
}

.branch-order-guide-header {
    padding-bottom: 18px;
    border-bottom: 1px solid #eef2f6;
}

.branch-order-guide-section {
    background: #fbfcfe;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
}

.branch-order-guide-control-card,
.branch-order-guide-summary-card {
    background: #f8fafc;
    border: 1px solid #dde5ee;
    border-radius: 8px;
}

.branch-order-guide-control-card {
    padding: 16px;
}

.branch-order-guide-summary-card {
    min-height: 100%;
    padding: 16px;
}

.branch-order-guide-summary-value {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.branch-order-guide-control-card .form-label,
.branch-order-guide-section .order-guide-row .form-label {
    color: #273142;
    font-weight: 600;
}

.branch-order-guide-control-card .form-control,
.branch-order-guide-control-card .form-select,
.branch-order-guide-section .order-guide-row .form-control {
    min-height: 44px;
}

.branch-order-guide-control-card .form-text {
    display: block;
    margin-top: 6px;
    color: #5f6f85;
}

.branch-order-guide-section .order-guide-section {
    background: #fff;
    border: 1px solid #dde5ee;
    border-radius: 8px;
    overflow: hidden;
}

.branch-order-guide-section .order-guide-section-header {
    background: #f8fafc;
    border-bottom: 1px solid #dde5ee;
    padding: 14px 16px;
    color: #172033;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.branch-order-guide-section .order-guide-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 130px 90px 110px 100px minmax(180px, 0.8fr);
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f6;
}

.branch-order-guide-section .order-guide-row:last-child {
    border-bottom: 0;
}

.branch-order-guide-section .order-guide-product-name {
    color: #172033;
    font-weight: 700;
}

.branch-order-guide-section .order-guide-meta {
    color: #5f6f85;
    font-size: 0.82rem;
}

.branch-order-guide-section .guide-qty {
    font-weight: 700;
}

.branch-order-guide-section .order-guide-readonly-field {
    color: #485568;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-order-guide-section .order-guide-sticky-actions {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #dde5ee;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 -6px 18px rgba(15, 23, 42, 0.08);
}

.branch-order-guide-actions .btn,
.branch-order-guide-save-actions .btn {
    min-width: 130px;
}

.app-sidebar {
    height: 100vh;
    width: 260px;
    padding: 18px 14px;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.35) transparent;
}

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

.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

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

.sidebar-brand {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 8px 10px 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    padding: 8px 10px;
    margin-top: 8px;
    letter-spacing: 0.04em;
}

.app-sidebar .nav-link {
    border-radius: 8px;
    padding: 9px 12px;
    color: rgba(255,255,255,0.85) !important;
}

.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #fff !important;
}

.app-sidebar .nav-link.active {
    background: #0d6efd;
    color: #fff !important;
}

.app-main,
main.app-main {
    margin-left: 260px;
    min-height: 100vh;
}

@media (max-width: 575.98px) {
    .readiness-status {
        width: 100%;
    }

    .readiness-actions .btn {
        width: 100%;
    }

    .branch-requests-section,
    .branch-request-detail-card {
        padding: 14px;
    }

    .branch-requests-section #newRequestBtn,
    .branch-request-actions,
    .branch-request-actions .btn,
    .branch-request-modal-actions,
    .branch-request-modal-actions .btn {
        width: 100%;
    }

    .branch-request-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ai-price-reader-section {
        padding: 14px;
    }

    .ai-price-reader-actions,
    .ai-price-reader-actions .btn {
        width: 100%;
    }

    .ai-price-reader-input-card textarea {
        min-height: 240px;
    }

    .weekly-prices-section {
        padding: 14px;
    }

    .weekly-prices-section #addWeeklyPriceBtn,
    .weekly-prices-actions,
    .weekly-prices-actions .btn {
        width: 100%;
    }

    .weekly-prices-action-spacer {
        display: none;
    }

    .compare-orders-section {
        padding: 14px;
    }

    .compare-orders-actions,
    .compare-orders-actions .btn,
    .compare-orders-table .btn {
        width: 100%;
    }

    .purchase-orders-section {
        padding: 14px;
    }

    .purchase-orders-actions,
    .purchase-orders-actions .btn {
        width: 100%;
    }

    .reports-section {
        padding: 14px;
    }

    .reports-actions,
    .reports-actions .btn {
        width: 100%;
    }

    .branches-section {
        padding: 14px;
    }

    .branches-actions,
    .branches-actions .btn,
    .branches-modal-actions,
    .branches-modal-actions .btn {
        width: 100%;
    }

    .branches-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .suppliers-section {
        padding: 14px;
    }

    .suppliers-actions,
    .suppliers-actions .btn,
    .suppliers-modal-actions,
    .suppliers-modal-actions .btn {
        width: 100%;
    }

    .suppliers-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .products-section {
        padding: 14px;
    }

    .products-actions,
    .products-actions .btn,
    .products-bulk-actions,
    .products-bulk-actions .btn,
    .products-modal-actions,
    .products-modal-actions .btn {
        width: 100%;
    }

    .products-actions,
    .products-bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .products-bulk-textarea {
        min-height: 220px;
    }

    .products-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .product-aliases-section {
        padding: 14px;
    }

    .product-aliases-actions,
    .product-aliases-actions .btn,
    .product-aliases-modal-actions,
    .product-aliases-modal-actions .btn {
        width: 100%;
    }

    .product-aliases-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .product-settings-section {
        padding: 14px;
    }

    .product-settings-actions,
    .product-settings-actions .btn,
    .product-settings-modal-actions,
    .product-settings-modal-actions .btn {
        width: 100%;
    }

    .product-settings-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .restaurant-settings-section {
        padding: 14px;
    }

    .restaurant-settings-card-body,
    .restaurant-settings-preview-card {
        padding: 16px;
    }

    .restaurant-settings-actions,
    .restaurant-settings-actions .btn {
        width: 100%;
    }

    .branch-order-setup-section {
        padding: 14px;
    }

    .branch-order-setup-actions,
    .branch-order-setup-actions .btn,
    .branch-order-setup-form-actions,
    .branch-order-setup-form-actions .btn {
        width: 100%;
    }

    .branch-order-setup-form-actions {
        flex-direction: column;
    }

    .branch-order-setup-button-spacer {
        display: none;
    }

    .branch-order-setup-section .setup-section-header,
    .branch-order-setup-section .setup-section-actions,
    .branch-order-setup-section .setup-product-actions,
    .branch-order-setup-section .setup-product-actions .btn {
        width: 100%;
    }

    .branch-order-setup-section .setup-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .branch-order-setup-section .setup-section-actions,
    .branch-order-setup-section .setup-product-actions {
        flex-direction: column;
    }

    .branch-order-guide-section {
        padding: 14px;
    }

    .branch-order-guide-actions,
    .branch-order-guide-actions .btn,
    .branch-order-guide-save-actions,
    .branch-order-guide-save-actions .btn {
        width: 100%;
    }

    .branch-order-guide-save-actions {
        flex-direction: column;
    }

    .branch-order-guide-section .order-guide-section-header {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 991.98px) {
    .branch-order-setup-section .setup-product-row {
        grid-template-columns: 1fr;
    }

    .branch-order-guide-section .order-guide-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
    }

    .app-main,
    main.app-main {
        width: 100%;
        min-height: 100vh;
        margin-left: 0;
        padding: 16px;
    }

    .branch-user-shell .app-sidebar {
        display: none;
    }

    .branch-user-shell .app-main,
    .branch-user-shell main.app-main {
        padding: 14px;
    }

    .branch-user-topbar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 12px;
    }

    .branch-user-topbar h1 {
        font-size: 1.35rem;
    }

    .branch-user-topbar .badge {
        align-self: flex-start;
    }

    .branch-user-topbar > .d-flex {
        flex-direction: column;
        align-items: flex-end !important;
        gap: 6px !important;
    }

    .branch-user-topbar .text-secondary {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .branch-user-shell .branch-order-guide-help {
        display: none;
    }

    .branch-user-shell .branch-order-guide-section {
        border: 0;
        border-radius: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .branch-user-shell .branch-order-guide-control-card,
    .branch-user-shell .branch-order-guide-summary-card,
    .branch-user-shell .order-guide-section {
        border-radius: 8px;
    }

    .branch-user-shell .branch-order-guide-control-card {
        padding: 12px;
    }

    .branch-user-shell #guideSummaryCards {
        row-gap: 0.75rem;
    }

    .branch-user-shell .branch-order-guide-summary-card {
        padding: 12px;
    }

    .branch-user-shell .branch-order-guide-summary-value {
        font-size: 1.25rem;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-section-header {
        padding: 12px;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.7rem;
        align-items: stretch;
        padding: 12px;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-row > div:first-child,
    .branch-user-shell .branch-order-guide-section .order-guide-row > div:last-child {
        grid-column: 1 / -1;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-row > div:nth-child(2) {
        grid-column: 1 / -1;
    }

    .branch-user-shell .branch-order-guide-section .guide-qty {
        min-height: 52px;
        font-size: 1.15rem;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-readonly-field {
        min-height: 42px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .branch-user-shell .branch-order-guide-section .guide-note {
        min-height: 46px;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-sticky-actions {
        position: static;
        width: 100%;
        margin-top: 1rem;
        padding: 12px;
        background: #fff;
        box-shadow: none;
    }

    .branch-user-shell .branch-order-guide-save-actions {
        width: 100%;
        flex-direction: column;
    }

    .branch-user-shell .branch-order-guide-save-actions .btn {
        width: 100%;
        min-height: 48px;
    }
}

@media (max-width: 374.98px) {
    .branch-user-shell .branch-order-guide-section .order-guide-row {
        grid-template-columns: 1fr;
    }

    .branch-user-shell .branch-order-guide-section .order-guide-row > div {
        grid-column: 1 / -1;
    }
}
