/* Shared bakery admin palette and dashboard layout. */
.bakery-admin { --bakery-navy: #06121d; --bakery-blue: #9db6cb; --bakery-orange: #ff8a32; --bakery-muted: #65717c; --bakery-border: #e5e9ed; color: #161b20; font-family: 'Segoe UI', Arial, sans-serif; }
.bakery-admin .content-wrapper { background: #f4f6f8; }
.bakery-admin .main-sidebar { background: var(--bakery-navy); box-shadow: none !important; }
.bakery-admin .brand-link { border-bottom: 1px solid #24323e; background: #fff; min-height: 65px; }
.bakery-admin .main-header { min-height: 65px; border-bottom: 1px solid var(--bakery-border); box-shadow: none; }
.bakery-admin .sidebar { padding: 18px 12px; }
.bakery-admin .nav-sidebar > .nav-item { margin-bottom: 6px; }
.bakery-admin .nav-sidebar .nav-link { border-radius: 8px; padding: 12px; color: #c0cfdb; }
.bakery-admin .nav-sidebar .nav-link:hover { background: #182b3c; color: #fff; }
.bakery-admin .nav-sidebar > .nav-item > .nav-link.active { color: #06121d; background: var(--bakery-orange); box-shadow: none; font-weight: 600; }
.bakery-admin .nav-sidebar .nav-header { color: var(--bakery-blue); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; padding-top: 22px; border-color: #24323e !important; }
.bakery-admin .sidebar .form-control-sidebar, .bakery-admin .sidebar .btn-sidebar { background: #132330; border-color: #293c4c; color: #fff; }
.bakery-admin .sidebar .form-control-sidebar::placeholder { color: var(--bakery-blue); }
.bakery-admin .sidebar .text-danger { color: var(--bakery-orange) !important; }
.bakery-admin .content-header { padding: 30px 28px 22px; }
.bakery-admin .content-wrapper > .content { padding: 0 28px 24px; }
.bakery-admin .btn-primary { background: var(--bakery-orange); border-color: var(--bakery-orange); color: #06121d; font-weight: 600; }
.bakery-admin .btn-primary:hover, .bakery-admin .btn-primary:active { background: #f47719 !important; border-color: #f47719 !important; color: #06121d !important; }
.bakery-admin a:focus-visible, .bakery-admin button:focus-visible { outline: 3px solid #b95409; outline-offset: 3px; }
.bakery-admin .form-control:focus { border-color: #bc671f; box-shadow: 0 0 0 3px #ff8a3226; }
.bakery-admin .card { border-radius: 10px; box-shadow: 0 2px 8px #06121d05; border: 1px solid var(--bakery-border); }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bakery-admin .dashboard-heading h1 { font-weight: 700; font-size: 30px; letter-spacing: -.8px; margin-bottom: 7px; }
.eyebrow { color: #8c430e; font-size: 10px; font-weight: 700; letter-spacing: 2px; margin-bottom: 7px; }
.dashboard-muted { color: var(--bakery-muted); }
.dashboard-date { background: #fff; border: 1px solid var(--bakery-border); padding: 10px 14px; border-radius: 7px; color: #465460; font-size: 12px; white-space: nowrap; }
.dashboard-welcome { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 25px; background: var(--bakery-navy); border-radius: 14px; padding: 36px; color: #fff; }
.welcome-copy { position: relative; z-index: 1; min-width: 0; }
.welcome-label { color: var(--bakery-orange); font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.dashboard-welcome h2 { font-size: clamp(24px, 2.5vw, 34px); font-weight: 650; letter-spacing: -.8px; margin: 12px 0; overflow-wrap: anywhere; }
.dashboard-welcome p { color: var(--bakery-blue); font-size: 14px; line-height: 1.8; margin-bottom: 25px; }
.dashboard-welcome .btn { padding: 11px 18px; border-radius: 7px; font-size: 13px; }
.welcome-link { color: #fff; display: inline-block; margin: 12px 0 12px 20px; font-size: 13px; }
.welcome-link:hover { color: var(--bakery-orange); }
.welcome-art { position: relative; display: flex; flex: 0 0 210px; height: 180px; align-items: center; justify-content: center; flex-direction: column; }
.welcome-art > i { color: var(--bakery-orange); font-size: 78px; transform: rotate(-12deg); z-index: 1; }
.welcome-art > span { font-size: 8px; letter-spacing: 2px; color: var(--bakery-blue); margin-top: 24px; z-index: 1; }
.art-ring { position: absolute; width: 185px; height: 185px; border: 1px solid #9db6cb30; border-radius: 50%; }
.art-ring::before, .art-ring::after { content: ''; position: absolute; inset: -24px; border: 1px solid #9db6cb16; border-radius: 50%; }
.art-ring::after { inset: -48px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.dashboard-stat { display: flex; gap: 20px; padding: 24px; background: #fff; border: 1px solid var(--bakery-border); border-radius: 11px; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; background: #e9eff4; color: #344e64; font-size: 20px; }
.stat-orange { background: #fff0e4; color: #a54b09; }
.stat-gray { background: #f0f1f3; color: #64707b; }
.dashboard-stat p { margin: 0 0 5px; font-size: 13px; color: #52616e; }
.dashboard-stat strong { display: block; font-size: 32px; line-height: 1.2; letter-spacing: -1px; color: #06121d; }
.dashboard-stat small { display: block; color: var(--bakery-muted); font-size: 11px; margin-top: 8px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.dashboard-panel { background: #fff; border: 1px solid var(--bakery-border); border-radius: 11px; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 24px; }
.panel-heading h2 { font-size: 17px; font-weight: 650; margin: 0 0 7px; }
.panel-heading p { font-size: 12px; color: var(--bakery-muted); margin: 0; }
.panel-heading > a { color: #9b4708; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dashboard-table { font-size: 13px; }
.dashboard-table th { background: #fafbfc; color: #65717c; text-transform: uppercase; letter-spacing: .8px; font-size: 10px; border-bottom: 1px solid var(--bakery-border) !important; padding: 13px 18px; }
.dashboard-table td { padding: 18px; vertical-align: middle; border-color: #eff1f4; }
.dashboard-table td:first-child { min-width: 180px; overflow-wrap: anywhere; }
.dashboard-table td a { color: #1d2d3b; font-weight: 600; }
.root-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; background: #f0f4f7; color: #536f86; margin-right: 10px; }
.root-status { background: #f0f1f3; color: #57616b; border-radius: 30px; padding: 5px 10px; font-size: 11px; white-space: nowrap; }
.root-status.is-active { color: #91400a; background: #fff0e4; }
.root-edit { display: inline-flex; padding: 8px; border-radius: 6px; }
.root-edit:hover { background: #fff0e4; }
.dashboard-empty { text-align: center; padding: 25px 20px 40px; }
.dashboard-empty h3 { font-size: 18px; margin: 18px 0 8px; }
.dashboard-empty p { font-size: 13px; color: var(--bakery-muted); }
.dashboard-empty .btn { font-size: 12px; padding: 9px 15px; border-radius: 7px; }
.quick-action { display: flex; gap: 13px; align-items: center; margin: 0 18px; padding: 15px 6px; color: #06121d; border-bottom: 1px solid #eff1f4; }
.quick-action:hover { color: #91400a; background: #fffaf6; }
.action-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; border: 1px solid #e3e8ed; border-radius: 9px; color: #3d566b; }
.quick-action strong { display: block; font-size: 13px; font-weight: 600; }
.quick-action small { display: block; color: var(--bakery-muted); margin-top: 4px; font-size: 11px; }
.quick-action > i { margin-left: auto; font-size: 10px; color: #687c8c; }
.workspace-note { display: flex; gap: 12px; margin: 20px; padding: 15px; border-radius: 8px; background: #f0f4f7; color: #425969; }
.workspace-note p { margin: 0; font-size: 11px; line-height: 1.7; }
.workspace-note i { margin-top: 3px; }
.dashboard-footnote { text-align: center; font-size: 11px; color: #65717c; margin: 25px 0 0; }
@media (min-width: 1600px) { .bakery-dashboard, .dashboard-heading { max-width: 1500px; margin-left: auto; margin-right: auto; } }
@media (max-width: 1199px) { .dashboard-grid { grid-template-columns: 1fr; } .dashboard-stat { padding: 18px; gap: 12px; } }
@media (max-width: 767px) { .bakery-admin .content-header { padding: 22px 12px 18px; } .bakery-admin .content-wrapper > .content { padding: 0 12px 20px; } .dashboard-heading { align-items: flex-start; flex-direction: column; gap: 14px; } .dashboard-welcome { padding: 26px 22px; } .welcome-art { display: none; } .dashboard-stats { grid-template-columns: 1fr; gap: 12px; margin: 18px 0; } .dashboard-stat { align-items: center; } .dashboard-stat > div:last-child { flex: 1; } .dashboard-stat strong { float: right; margin-top: -25px; } .welcome-link { margin-left: 12px; } .panel-heading { padding: 20px; } .dashboard-date { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .bakery-admin *, .bakery-admin *::before, .bakery-admin *::after { transition: none !important; animation: none !important; } }

/* Root directory */
.root-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 5px 0 8px; }
.bakery-admin .root-page-heading h1 { color: #06121d; font-size: 30px; font-weight: 700; letter-spacing: -.8px; margin: 0 0 8px; }
.root-page-heading .dashboard-muted { font-size: 14px; line-height: 1.6; }
.root-create-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border-radius: 9px; font-size: 14px; white-space: nowrap; box-shadow: 0 4px 12px #ff8a3220; }
.root-list-panel { background: #fff; border: 1px solid #e5e9ed; border-radius: 14px; box-shadow: 0 4px 20px #06121d04; overflow: hidden; margin: 0 0 24px; }
.root-list-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 26px; border-bottom: 1px solid #edf0f3; }
.root-list-intro h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; color: #06121d; margin: 0 0 6px; }
.root-list-intro p { margin: 0; color: #65717c; font-size: 13px; }
.root-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; padding: 4px 9px; background: #eaf0f5; color: #38526a; border-radius: 20px; font-size: 11px; }
.root-list-caption { color: #65717c; font-size: 12px; white-space: nowrap; }
.root-list-caption i { color: #58758e; margin-right: 6px; }
.root-table-toolbar, .root-table-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 26px; }
.root-list-panel .dataTables_wrapper .dataTables_length, .root-list-panel .dataTables_wrapper .dataTables_filter { float: none; text-align: left; }
.root-list-panel .dataTables_wrapper label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12px; font-weight: 500; color: #52616e; white-space: nowrap; }
.root-list-panel .dataTables_wrapper .dataTables_filter input { width: 250px; margin: 0; padding: 10px 13px; height: 40px; font-size: 12px; background: #fafbfc; border: 1px solid #dce3e9; border-radius: 8px; }
.root-list-panel .dataTables_wrapper .dataTables_length select { width: auto; min-width: 66px; height: 38px; margin: 0; border: 1px solid #dce3e9; border-radius: 7px; background-color: #fff; font-size: 12px; }
.root-list-panel table.root-directory-table { width: 100% !important; min-width: 650px; margin: 0 !important; border-collapse: collapse !important; border: 0; color: #06121d; }
.root-list-panel .root-directory-table thead th { padding: 16px 28px 16px 24px; background: #f1f5f8; color: #526576; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .8px; border-top: 1px solid #e8edf2; border-bottom: 1px solid #e2e8ee; white-space: nowrap; }
.root-list-panel .root-directory-table tbody td { height: 76px; padding: 18px 24px; vertical-align: middle; border-top: 0; border-bottom: 1px solid #edf0f3; background: #fff; font-size: 14px; }
.root-list-panel .root-directory-table tbody tr:hover td { background: #fffaf6; }
.root-list-panel .root-directory-table tbody td:first-child { color: #71808d; font-size: 12px; }
.root-list-panel .root-directory-table tbody td:nth-child(2) { font-weight: 600; overflow-wrap: anywhere; max-width: 440px; }
.root-list-panel .root-status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; font-size: 11px; font-weight: 600; }
.root-list-panel .root-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.root-row-actions { display: flex; align-items: center; gap: 8px; }
.root-row-actions form { display: inline-flex; margin: 0; }
.root-action { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; font-size: 13px; cursor: pointer; }
.root-action-view { color: #385870; background: #eaf0f5; }
.root-action-edit { color: #97470e; background: #fff0e4; }
.root-action-delete { color: #a54444; background: #fcf0f0; }
.root-action:hover { color: #06121d; border-color: #9db6cb; filter: brightness(.97); }
.root-table-footer { padding-top: 18px; padding-bottom: 18px; }
.root-list-panel .dataTables_wrapper .dataTables_info { padding: 0; color: #65717c; font-size: 12px; }
.root-list-panel .dataTables_wrapper .dataTables_paginate { padding: 0; }
.root-list-panel .pagination { margin: 0; gap: 5px; }
.root-list-panel .page-item .page-link { border: 1px solid #e3e8ed; border-radius: 7px; color: #52616e; font-size: 12px; padding: 9px 13px; background: #fff; box-shadow: none; }
.root-list-panel .page-item.active .page-link { background: #06121d; border-color: #06121d; color: #fff; }
.root-list-panel .page-item.disabled .page-link { color: #737f89; background: #f8fafb; }
.root-list-panel .page-item:not(.disabled):not(.active) .page-link:hover { background: #fff0e4; border-color: #ff8a32; color: #06121d; }
.root-list-panel .dataTables_empty { padding: 48px 24px !important; color: #65717c; }
@media (max-width: 767px) { .root-page-heading { flex-direction: column; align-items: flex-start; gap: 18px; } .bakery-admin .root-page-heading h1 { font-size: 26px; } .root-create-button { width: 100%; } .root-list-intro { padding: 20px; } .root-list-caption { display: none; } .root-table-toolbar, .root-table-footer { padding: 18px 20px; flex-wrap: wrap; gap: 16px; } .root-list-panel .dataTables_wrapper .dataTables_filter input { width: 190px; } .root-list-panel > .table-responsive { overflow-x: auto; } }

/* Root forms and record details share the directory's spacing and palette. */
.root-back-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: #fff; color: #354b5e; border: 1px solid #dce3e9; border-radius: 8px; padding: 11px 17px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.root-back-button:hover { color: #06121d; background: #eaf0f5; border-color: #9db6cb; }
.root-section-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.root-section-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px; background: #eaf0f5; color: #385870; font-size: 18px; }
.root-required-note { color: #65717c; font-size: 12px; white-space: nowrap; }
.root-form-body { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 32px 28px 38px; }
.root-field { min-width: 0; }
.root-field label { display: block; margin-bottom: 10px; color: #263b4d; font-size: 13px; font-weight: 600; }
.root-required { color: #9b4708; margin-left: 3px; }
.root-form-panel .form-control { height: 48px; padding: 12px 14px; border: 1px solid #dce3e9; border-radius: 8px; background-color: #fafbfc; color: #06121d; font-size: 14px; }
.root-form-panel .form-control:focus { background-color: #fff; border-color: #bc671f; }
.root-form-panel .form-control.is-invalid { border-color: #b33c3c; }
.root-form-panel .form-control::placeholder { color: #748390; }
.root-field-help { margin: 10px 0 0; color: #65717c; font-size: 12px; line-height: 1.6; }
.root-field .invalid-message { font-size: 12px; margin-top: 6px; }
.root-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid #edf0f3; background: #fafbfc; padding: 22px 28px; }
.root-form-note { display: flex; align-items: center; gap: 9px; color: #65717c; font-size: 12px; }
.root-form-note i { color: #58758e; }
.root-form-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.root-form-buttons .btn { border-radius: 8px; padding: 11px 18px; font-size: 13px; font-weight: 600; }
.root-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 32px 28px; margin: 0; }
.root-details-grid > div { min-width: 0; }
.root-details-grid dt { color: #65717c; text-transform: uppercase; letter-spacing: .8px; font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.root-details-grid dd { color: #263b4d; font-size: 14px; margin: 0; overflow-wrap: anywhere; }
.root-details-grid .root-detail-name { color: #06121d; font-size: 20px; font-weight: 600; }
@media (max-width: 767px) { .root-form-body, .root-details-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px 20px; } .root-form-footer { padding: 20px; flex-direction: column; align-items: stretch; gap: 18px; } .root-form-buttons .btn { flex: 1; } .root-form-panel .root-list-intro { flex-wrap: wrap; gap: 14px; } .root-page-heading > .root-back-button { width: 100%; } }

.rep-shell.rep-workspace { max-width: 1120px; }
.rep-navigation { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.rep-navigation a { color: #fff; border: 1px solid #38526a; padding: 10px 16px; border-radius: 8px; font-size: 13px; }
.rep-navigation a:hover { color: #06121d; background: #ff8a32; }
.invoice-entry-table { min-width: 750px; margin: 0; }
.invoice-entry-table th { color: #526576; font-size: 12px; background: #f1f5f8; }
.invoice-entry-table td { vertical-align: middle; }
.invoice-entry-table th:first-child { width: 40%; }
.invoice-entry-table .item-quantity { min-width: 90px; }
.invoice-entry-table .item-price { min-width: 125px; }
@media print { .no-print, .rep-navigation, .rep-brand { display: none !important; } body.rep-portal { display: block; background: white !important; padding: 0 !important; } .rep-shell.rep-workspace { max-width: none; } .rep-shell .root-list-panel { border: 0; box-shadow: none; } .table-responsive { overflow: visible; } .root-directory-table { min-width: 0 !important; } }

.admin-table-search { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 24px; }
.admin-table-search label { margin: 0; font-size: 13px; color: #526576; }
.admin-table-search .form-control { width: 280px; max-width: 100%; }
.admin-table-search [role="status"] { font-size: 12px; color: #65717c; }
.bakery-admin table tr[hidden] { display: none !important; }
@media (max-width: 575px) { .admin-table-search { align-items: stretch; flex-direction: column; } .admin-table-search .form-control { width: 100%; } }
@media print { .admin-table-search, .admin-table-search-empty { display: none !important; } .bakery-admin table tr[hidden] { display: table-row !important; } }

/* Keep dispatch batch numbers readable in admin and office load forms. */
#load-items input[name$="[batch_no]"] { min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }

/* Compact dispatch table: one item per row, sized to the available width. */
.root-list-panel > .dispatch-load-container { overflow: visible; padding: 0 12px; }
.dispatch-load-table { width: 100%; min-width: 0; table-layout: fixed; }
.bakery-admin .dispatch-load-table th, .bakery-admin .dispatch-load-table td { padding: 10px 5px; vertical-align: middle; font-size: 12px; overflow-wrap: anywhere; }
.dispatch-load-table th:nth-child(1) { width: 25%; }
.dispatch-load-table th:nth-child(2) { width: 4%; }
.dispatch-load-table th:nth-child(3) { width: 7%; }
.dispatch-load-table th:nth-child(4) { width: 15%; }
.dispatch-load-table th:nth-child(5), .dispatch-load-table th:nth-child(6) { width: 12%; }
.dispatch-load-table th:nth-child(7) { width: 6%; }
.dispatch-load-table th:nth-child(8) { width: 5%; }
.dispatch-load-table th:nth-child(9) { width: 6%; }
.dispatch-load-table th:nth-child(10) { width: 8%; }
.bakery-admin .dispatch-load-table .form-control { min-width: 0; width: 100%; max-width: 100%; height: 38px; min-height: 38px; padding: 6px; font-size: 12px; border-radius: 6px; }
.bakery-admin .dispatch-load-table td .select2-container { min-width: 0; max-width: 100%; width: 100% !important; }
.bakery-admin .dispatch-load-table .select2-selection--single { min-height: 38px; height: 38px; }
.bakery-admin .dispatch-load-table .select2-selection--single .select2-selection__rendered { line-height: 36px; padding-left: 6px; padding-right: 20px; font-size: 12px; }
.bakery-admin .dispatch-load-table .remove-load-item { min-width: 0; width: 100%; min-height: 38px; padding: 6px 3px; font-size: 12px; white-space: normal; }
.dispatch-load-table input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.dispatch-load-table input[type=number]::-webkit-inner-spin-button, .dispatch-load-table input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
