:root {
    --app-navy: #102b36;
    --app-accent: #087e82;
    --app-border: #e1e9ea;
    --app-muted: #61757c;
    --app-bg: #f3f6f6;
    --app-radius: 14px;
    --app-sidebar: 248px;
    --app-header: 72px;
}
.app-shell { background: var(--app-bg); color: #243e47; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: .9rem; line-height: 1.55; }
.app-shell h1, .app-shell h2, .app-shell h3, .app-shell h4 { color: var(--app-navy); font-weight: 650; letter-spacing: -.035em; }
.app-shell h1 { font-size: 1.85rem; margin: 0 0 .45rem; line-height: 1.2; }
.app-shell h2 { font-size: 1.35rem; }
.app-shell h3 { font-size: 1.15rem; }
.app-shell h4 { font-size: 1.05rem; }
.app-shell .text-muted, .app-shell .text-gray-500 { color: var(--app-muted) !important; }
.app-shell .text-primary, .app-shell .text-info { color: var(--app-accent) !important; }
.app-shell .text-warning { color: #92650d !important; }
.app-shell .text-gray-800 { color: var(--app-navy); }
.app-shell a { text-underline-offset: 3px; }
.app-shell .sb-topnav { height: var(--app-header); background: white !important; border-bottom: 1px solid var(--app-border); padding-right: 1.4rem; }
.app-shell .navbar-brand { width: var(--app-sidebar); display: flex; align-items: center; gap: .65rem; padding-left: 1.4rem; }
.app-shell .navbar-brand img { width: 38px; height: 38px; object-fit: contain; margin: 0 !important; }
.brand-wordmark { color: var(--app-navy); font-size: 1.3rem; font-weight: 750; letter-spacing: -.06em; line-height: 1.1; }
.brand-wordmark > span { display: block; font-size: .59rem; font-weight: 500; letter-spacing: .025em; color: var(--app-muted); margin-top: .3rem; }
.app-shell #sidebarToggle { color: #566f77; border: 1px solid var(--app-border); width: 36px; height: 36px; border-radius: 9px; margin: 0 1.2rem 0 .25rem; }
.topbar-context { color: var(--app-muted); font-size: .78rem; }
.topbar-context > span { color: #b3c2c6; margin: 0 .7rem; }
.app-shell #userDropdown { color: var(--app-navy); display: flex; align-items: center; gap: .3rem; }
.app-shell #userDropdown > svg { font-size: 1.6rem; color: var(--app-accent); }
.app-shell .user-name { font-size: .8rem; font-weight: 600; }
.app-shell .dropdown-menu { border: 1px solid var(--app-border); border-radius: 12px; box-shadow: 0 12px 36px #102b361a; padding: .5rem; font-size: .85rem; }
.app-shell .dropdown-item { padding: .65rem .85rem; border-radius: 7px; }
.app-shell .dropdown-item:active { background: var(--app-accent); }
.app-shell #layoutSidenav #layoutSidenav_nav { width: var(--app-sidebar); flex-basis: var(--app-sidebar); transform: translateX(calc(-1 * var(--app-sidebar))); }
.app-shell #layoutSidenav #layoutSidenav_content { padding-left: var(--app-sidebar); margin-left: calc(-1 * var(--app-sidebar)); top: var(--app-header); min-height: calc(100vh - var(--app-header)); transition: none; }
.app-shell #layoutSidenav #layoutSidenav_nav .sb-sidenav { padding-top: var(--app-header); background: var(--app-navy); }
.app-shell.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
.app-shell .sb-sidenav .sb-sidenav-menu-heading { padding: 1.9rem 1.65rem .65rem; color: #8fa9b0; font-size: .61rem; letter-spacing: .16em; font-weight: 650; }
.app-shell .sb-sidenav .nav-link { color: #c1d2d6; margin: 3px 14px; padding: .8rem 1rem; border-radius: 9px; font-size: .82rem; min-height: 44px; transition: background .15s, color .15s; }
.app-shell .sb-sidenav .nav-link .sb-nav-link-icon { color: #87a6af; width: 21px; margin-right: .65rem; }
.app-shell .sb-sidenav .nav-link:hover { color: white; background: #ffffff0d; }
.app-shell .sb-sidenav .nav-link.active { color: #fff; background: #ffffff14; box-shadow: inset 3px 0 0 #66d5c4; }
.app-shell .sb-sidenav .nav-link.active .sb-nav-link-icon { color: #76ddcd; }
.workspace-card { display: flex; align-items: center; gap: .8rem; margin: 1rem; padding: 1rem .7rem; border-top: 1px solid #ffffff1a; color: #deebed; }
.workspace-card strong, .workspace-card span:not(.workspace-icon) { display: block; font-size: .76rem; }
.workspace-card div > span { color: #9bb3ba; font-size: .65rem !important; margin-top: .2rem; }
.workspace-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #ffffff24; border-radius: 10px; color: #76ddcd; }
.app-shell .app-content { padding: 2rem 2rem 2.5rem; max-width: 1800px; margin: 0 auto; }
.app-shell .app-content > .container-fluid { padding: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.9rem; }
.eyebrow { color: var(--app-accent); font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; margin-bottom: .65rem; }
.page-description { color: var(--app-muted); font-size: .85rem; margin: 0; }
.app-shell .card { background: white; border: 1px solid var(--app-border); border-radius: var(--app-radius); box-shadow: 0 3px 5px #102b3603 !important; overflow: visible; margin-bottom: 1.3rem; }
.app-shell .card-header { border-bottom: 1px solid var(--app-border); padding: 1.15rem 1.4rem; border-radius: var(--app-radius) var(--app-radius) 0 0; background: white; color: var(--app-navy); }
.app-shell .card-header.bg-primary, .app-shell .card-header.bg-light { background: white !important; color: var(--app-navy) !important; }
.app-shell .card-header h4, .app-shell .card-header h5, .app-shell .card-header h6 { margin: 0; font-size: .92rem; color: var(--app-navy) !important; font-weight: 650; letter-spacing: -.015em; }
.app-shell .card-header .fas, .app-shell .card-header svg { color: var(--app-accent); margin-right: .35rem; }
.app-shell .card-body { padding: 1.4rem; }
.app-shell .card .card { box-shadow: none !important; background: #fafcfc; }
.app-shell .card .card .card-header { background: transparent !important; }
.app-shell .btn { border-radius: 8px; font-weight: 600; font-size: .8rem; transition: background-color .15s, box-shadow .15s; line-height: 1.5; }
.app-shell .btn:not(.btn-sm):not(.btn-link) { padding: .65rem 1rem; }
.app-shell .btn-primary, .app-shell .btn-info { background: var(--app-accent); border-color: var(--app-accent); color: #fff; box-shadow: 0 2px 3px #087e8214; }
.app-shell .btn-primary:hover, .app-shell .btn-primary:focus, .app-shell .btn-info:hover { background: #066569; border-color: #066569; }
.app-shell .btn-outline-primary { color: #086d71; border-color: #b0d3d2; background: #f2f9f8; }
.app-shell .btn-outline-primary:hover, .app-shell .btn-outline-primary:focus { background: var(--app-accent); color: white; border-color: var(--app-accent); }
.app-shell .btn-outline-secondary { border-color: #d5dfe2; background: white; color: #455f68; }
.app-shell .btn-outline-secondary:hover { background: #edf3f4; color: var(--app-navy); }
.app-shell .btn-warning { background: #fff2d4; border-color: #f3dfae; color: #76530e; }
.app-shell .btn-success { background: #e3f4ec; border-color: #b9ddcf; color: #22644f; }
.app-shell .btn-danger { background: #b93f46; border-color: #b93f46; }
.app-shell .btn-group { gap: 5px; }
.app-shell .btn-group > .btn { border-radius: 7px !important; margin-left: 0; }
.app-shell .btn:disabled { opacity: .45; }
.app-shell label { color: #405e68; font-weight: 600; font-size: .78rem; margin-bottom: .5rem; }
.app-shell .form-group { margin-bottom: 1.25rem; }
.app-shell .form-control { background-color: #fff; border: 1px solid #cedbdd; border-radius: 8px; color: #243e47; min-height: 43px; font-size: .85rem; padding: .6rem .8rem; }
.app-shell select.form-control { padding-top: .45rem; padding-bottom: .45rem; }
.app-shell .form-control::placeholder { color: #7d8f96; opacity: 1; }
.app-shell .form-control:focus { border-color: #279a9b; box-shadow: 0 0 0 3px #087e8214; }
.app-shell .form-control[readonly], .app-shell .form-control:disabled { background: #edf2f3; color: #5c727a; }
.app-shell textarea.form-control { min-height: 100px; }
.app-shell input[type="checkbox"] { accent-color: var(--app-accent); }
.app-shell input[type="checkbox"]:not(.custom-control-input) { width: 18px; height: 18px; vertical-align: middle; }
.app-shell .custom-control-input:checked ~ .custom-control-label::before { background: var(--app-accent); border-color: var(--app-accent); }
.app-shell .input-group > .form-control { min-width: 0; }
.app-shell .table { margin-bottom: 0; font-size: .79rem; color: #304d57; }
.app-shell .table thead th, .app-shell .thead-dark th { background: #f1f6f6 !important; color: #5b737b !important; border-top: 0; border-bottom: 1px solid var(--app-border); font-size: .63rem; font-weight: 650; text-transform: uppercase; letter-spacing: .055em; padding: .95rem .8rem; vertical-align: middle; white-space: nowrap; }
.app-shell .table td { border-color: var(--app-border); padding: .9rem .8rem; vertical-align: middle; }
.app-shell .table-striped tbody tr:nth-of-type(odd) { background: #fcfdfd; }
.app-shell .table-hover tbody tr:hover { background: #f0f8f7; }
.app-shell .table-primary, .app-shell .table-primary > td, .app-shell .table-primary > th { background: #dcf1ec !important; }
.app-shell .table-bordered, .app-shell .table-bordered td, .app-shell .table-bordered th { border-left: 0; border-right: 0; }
.app-shell .table-responsive { background: white; border: 1px solid var(--app-border); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.app-shell .table .btn { font-size: .73rem; }
.app-shell .badge { border-radius: 6px; padding: .4em .7em; line-height: 1.35; font-weight: 600; font-size: .68rem; white-space: nowrap; }
.app-shell .badge-success { color: #24634f; background: #e0f3e9; }
.app-shell .badge-warning { color: #825b12; background: #fff1cf; }
.app-shell .badge-danger { color: #a4353e; background: #fbe7e9; }
.app-shell .badge-secondary { color: #607079; background: #eaf0f2; }
.app-shell .badge-info { color: #15676d; background: #e0f3f2; }
.app-shell .progress { height: 8px; border-radius: 8px; background: #edf2f2; }
.app-shell .bg-success { background-color: #329b80 !important; }
.app-shell .bg-warning { background-color: #e8bd65 !important; }
.app-shell .bg-danger { background-color: #ce6871 !important; }
.app-shell .text-gray-300 { color: #9cbabf; }
.app-shell .text-xs { font-size: .66rem; }
.app-shell .alert { border-radius: 10px; padding: .9rem 1.1rem; }
.app-shell .alert-info { color: #235c66; background: #e9f5f6; border-color: #cbe3e7; }
.app-shell .page-link { color: #086d71; border-color: var(--app-border); border-radius: 7px; margin: 0 2px; font-size: .8rem; }
.app-shell .page-item.active .page-link { background: var(--app-accent); border-color: var(--app-accent); }
.list-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.25rem 0 .25rem; font-size: .78rem; }
.list-pagination .pagination { margin: 0; }
.search-box, .per-page-select { margin-bottom: 1rem; }
.loading-indicator { display: none; text-align: center; padding: 1.5rem; }
.app-shell .modal-content { border: 0; border-radius: 16px; box-shadow: 0 24px 80px #102b3630; }
.app-shell .modal-header { padding: 1.3rem 1.5rem; border-radius: 16px 16px 0 0; background: #f3f8f8 !important; color: var(--app-navy) !important; border-bottom: 1px solid var(--app-border); }
.app-shell .modal-title { font-size: 1.05rem; font-weight: 650; }
.app-shell .modal-header .close { color: var(--app-navy); text-shadow: none; }
.app-shell .modal-body { padding: 1.5rem; }
.app-shell footer { background: transparent !important; border-top: 1px solid var(--app-border); }
.app-shell footer .container-fluid { padding: 0 2rem; }
.app-shell footer .small { font-size: .7rem; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 1100; padding: .7rem 1rem; color: white; background: var(--app-navy); border-radius: 6px; }
.skip-link:focus { top: 8px; color: white; }
.app-shell :focus-visible { outline: 3px solid #1b9395; outline-offset: 3px; }
.form-status:empty { display: none; }
.form-status { color: #086d71; font-weight: 600; }
form[aria-busy="true"] { opacity: .7; }
.overview-banner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; background: #e6efed; border: 1px solid #d6e5e1; padding: 1.7rem 1.8rem; border-radius: var(--app-radius); margin-bottom: 1.7rem; }
.overview-label { color: #527a76; font-size: .6rem; font-weight: 750; letter-spacing: .12em; }
.overview-banner h2 { font-size: 1.4rem; margin: .65rem 0 .4rem; }
.overview-banner p { margin: 0; color: #59726f; font-size: .8rem; }
.overview-pending { display: flex; flex-direction: column; align-items: flex-end; color: #155b57; flex-shrink: 0; padding-left: 1.5rem; border-left: 1px solid #c5dbd3; }
.overview-pending:hover { color: #0c4844; text-decoration: none; }
.overview-pending strong { font-size: 2.8rem; line-height: 1.2; font-weight: 650; letter-spacing: -.07em; }
.overview-pending span { font-size: .72rem; }
.dashboard-metrics .card { border-left: 1px solid var(--app-border); padding: .3rem 0 !important; transition: border-color .15s, box-shadow .15s; }
.dashboard-metrics a:hover .card { border-color: #9fc8c5; box-shadow: 0 6px 18px #102b3609 !important; }
.dashboard-metrics .card .h5 { font-size: 1.9rem; letter-spacing: -.05em; margin-top: .4rem; }
.dashboard-metrics .card .col-auto { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: #edf5f4; }
.dashboard-metrics .card .col-auto svg { font-size: 1.15rem; color: var(--app-accent); }
.dashboard-metrics .text-xs { letter-spacing: .02em; }
.quick-actions .btn { text-align: left; padding: .75rem 1rem !important; }
.quick-actions .btn > svg { width: 18px; }
.total-amount { padding: 1.8rem .5rem; border-left: 1px solid var(--app-border); }
.total-amount .h4 { font-size: .72rem; color: var(--app-muted); text-transform: uppercase; letter-spacing: .06em; }
.total-amount .h2 { font-size: clamp(1.5rem, 2.4vw, 2.3rem); letter-spacing: -.05em; margin-top: .6rem; overflow-wrap: anywhere; }
.order-form { max-width: 1150px; margin: 0 auto; }
.app-shell .seccion { background: white; border: 1px solid var(--app-border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; }
.app-shell .seccion > h2, .app-shell .seccion > h3 { font-size: 1rem; padding-bottom: .85rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--app-border); }
.order-form label { display: block; margin-bottom: .4rem; }
.order-form .form-control { margin-bottom: 1rem; }
.order-form .direccion-grupo { border-left: 2px solid #abd5d0; padding: .5rem 0 .5rem 1rem; margin: 1rem 0; }
.order-form .direcciones-container { background: #f8fbfb; border: 1px solid var(--app-border); border-radius: 10px; padding: 1rem; }
.order-form h4 { font-size: .8rem; color: #08717d; margin-bottom: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; padding-top: .5rem; }
/* Login uses the same components and palette as the workspace. */
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-story { background: var(--app-navy); color: #d1e2e6; padding: 3rem 4rem 2rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-story::before { content: ""; position: absolute; width: 620px; height: 620px; border: 1px solid #ffffff0b; border-radius: 50%; right: -370px; top: 10%; box-shadow: 0 0 0 90px #ffffff03, 0 0 0 180px #ffffff02; pointer-events: none; }
.login-brand { display: inline-flex; align-items: center; gap: .8rem; color: white; font-size: 1.7rem; font-weight: 750; letter-spacing: -.06em; width: fit-content; }
.login-brand:hover { color: white; text-decoration: none; }
.login-brand img { width: 48px; height: 48px; background: white; border-radius: 12px; padding: 5px; object-fit: contain; }
.login-story-content { margin: auto 0; padding: 4rem 0; position: relative; }
.login-story .eyebrow { color: #80d7c9; font-size: .63rem; }
.login-story h1 { color: white; font-size: clamp(2.6rem, 4.1vw, 4.5rem); line-height: 1.14; letter-spacing: -.055em; margin: 1.4rem 0; }
.login-story h1 .login-line { display: block; color: white; }
.login-story h1 .login-highlight { color: #86d9cd; }
.login-story-content > p:not(.eyebrow) { font-size: .92rem; line-height: 1.8; max-width: 335px; color: #a5c0c9; }
.route-illustration { display: flex; align-items: center; max-width: 350px; margin-top: 3rem; gap: .8rem; }
.route-point { font-size: .68rem; color: #a5c0c9; }
.route-point::before { content: ""; display: block; width: 8px; height: 8px; border: 2px solid #86d9cd; border-radius: 50%; margin: 0 auto .6rem; }
.route-track { flex: 1; border-top: 1px dashed #ffffff40; margin-bottom: 1rem; }
.route-truck { color: #86d9cd; font-size: 1.35rem; margin-bottom: 1rem; }
.login-story-footer { font-size: .67rem; color: #91aeb7; position: relative; margin: 0; }
.login-container { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; background: #f7f9f9; }
.login-card { width: 100%; max-width: 390px; }
.login-header { padding-bottom: 1.5rem; }
.login-symbol { display: grid; place-items: center; width: 48px; height: 48px; background: #e4f0ed; color: var(--app-accent); font-size: 1.25rem; border-radius: 13px; margin-bottom: 1.8rem; }
.login-header h2 { font-size: 1.9rem; margin-bottom: .7rem; }
.login-header > p:last-child { color: var(--app-muted); font-size: .86rem; }
.login-page .form-control { min-height: 49px; padding-left: 2.7rem; background: white; }
.input-icon { position: relative; }
.input-icon > svg, .input-icon > i { position: absolute; top: 17px; left: 16px; color: #799299; width: 15px; }
.login-page .btn-login { width: 100%; min-height: 49px; margin-top: .5rem; }
.login-footer { border-top: 1px solid var(--app-border); padding-top: 1.5rem; margin-top: 2rem; font-size: .65rem; color: var(--app-muted); line-height: 1.8; }
@media (min-width: 992px) {
    .app-shell #layoutSidenav #layoutSidenav_nav { transform: translateX(0); }
    .app-shell #layoutSidenav #layoutSidenav_content { margin-left: 0; }
    .app-shell.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { transform: translateX(calc(-1 * var(--app-sidebar))); }
    .app-shell.sb-sidenav-toggled #layoutSidenav #layoutSidenav_content { margin-left: calc(-1 * var(--app-sidebar)); }
}
@media (min-width: 1200px) {
    .order-form > .seccion:nth-of-type(2) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
    .order-form > .seccion:nth-of-type(2) > h2 { grid-column: 1 / -1; }
    .order-form > .seccion:nth-of-type(2) > label { grid-column: 1; align-self: center; }
    .order-form > .seccion:nth-of-type(2) > input { grid-column: 2; }
}
@media (max-width: 1199.98px) {
    .login-story { padding: 2.5rem; }
    .overview-banner { padding: 1.4rem; }
    .overview-banner h2 { font-size: 1.15rem; }
}
@media (max-width: 991.98px) {
    .app-shell .app-content { padding: 1.5rem; }
    .app-shell .navbar-brand { width: auto; margin-right: 1.5rem; }
    .app-shell #sidebarToggle { margin-right: .75rem; }
    .app-shell .card-body { padding: 1.2rem; }
    .app-shell .table td { min-width: 85px; }
    .app-shell .btn-sm { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
    .app-shell .table td:first-child { min-width: 45px; }
    .login-layout { grid-template-columns: .9fr 1.1fr; }
    .login-story { padding: 2rem; }
    .login-container { padding: 2rem; }
}
@media (max-width: 767.98px) {
    :root { --app-header: 64px; }
    .app-shell .sb-topnav { padding-right: .75rem; }
    .app-shell .navbar-brand { padding-left: 1rem; max-width: none; margin-right: .6rem; }
    .app-shell .navbar-brand img { width: 32px; height: 32px; }
    .brand-wordmark { font-size: 1.13rem; }
    .brand-wordmark > span { font-size: .52rem; }
    .app-shell .app-content { padding: 1.4rem 1rem; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.5rem; }
    .app-shell h1 { font-size: 1.55rem; }
    .page-description { font-size: .8rem; }
    .app-shell .card-body { padding: 1rem; }
    .app-shell .card-header { padding: 1rem; gap: .7rem; flex-wrap: wrap; }
    .app-shell .form-control, .app-shell select, .app-shell textarea { font-size: 16px; }
    .app-shell .btn, .app-shell .page-link { min-height: 44px; }
    .app-shell .table .btn-group { flex-wrap: nowrap; }
    .app-shell .table td { padding: .75rem .65rem; }
    .list-pagination { flex-direction: column; align-items: flex-start; }
    .hide-on-mobile { display: none; }
    .overview-banner { align-items: flex-start; flex-direction: column; gap: 1.2rem; padding: 1.25rem; }
    .overview-pending { flex-direction: row; align-items: center; gap: .85rem; padding: 1rem 0 0; border-left: 0; border-top: 1px solid #c5dbd3; width: 100%; }
    .overview-pending strong { font-size: 2rem; }
    .dashboard-metrics { margin-right: -.4rem; margin-left: -.4rem; }
    .dashboard-metrics > div { width: 50%; padding-right: .4rem; padding-left: .4rem; margin-bottom: 1rem !important; }
    .dashboard-metrics .card-body { padding: 1rem .85rem; }
    .dashboard-metrics .card .col-auto { display: none; }
    .dashboard-metrics .card .h5 { font-size: 1.65rem; }
    .dashboard-metrics .text-xs { font-size: .6rem; }
    .total-amount { border-left: 0; border-top: 1px solid var(--app-border); margin-top: 1.5rem !important; padding: 1.5rem .5rem .5rem; }
    .app-shell .seccion { padding: 1rem; }
    .app-shell footer .container-fluid { padding: 0 1rem; }
    .login-layout { display: flex; flex-direction: column; }
    .login-story { padding: 1.4rem 1.5rem; }
    .login-brand { font-size: 1.45rem; }
    .login-brand img { width: 38px; height: 38px; }
    .login-story-content { padding: 1.8rem 0 .5rem; }
    .login-story h1 { font-size: 2rem; margin: .8rem 0; }
    .login-story h1 .login-line { display: inline; }
    .login-story-content > p:not(.eyebrow) { font-size: .8rem; }
    .route-illustration, .login-story-footer { display: none; }
    .login-container { padding: 2rem 1.5rem; flex: 1; }
    .login-symbol { display: none; }
    .login-header h2 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
    .app-shell *, .app-shell *::before, .app-shell *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
    .app-shell .sb-topnav, .app-shell #layoutSidenav #layoutSidenav_nav, .app-shell footer, .page-heading > .btn, .skip-link { display: none !important; }
    .app-shell #layoutSidenav #layoutSidenav_content { margin: 0; padding: 0; top: 0; }
    .app-shell .app-content { padding: 0; }
    .app-shell .table-responsive { overflow: visible; }
    .app-shell .card { box-shadow: none !important; break-inside: avoid; }
}

.app-shell .table .btn-group { white-space: nowrap; }

.permission-option { padding: .9rem 1rem .9rem 2.5rem; background: #f6f9f9; border: 1px solid var(--app-border); border-radius: 9px; margin-bottom: .7rem; }
.permission-option .form-check-input { margin-top: .2rem; }
.permission-option label { margin: 0; cursor: pointer; }
.app-shell .card-header > .d-flex { flex-wrap: wrap; gap: .75rem; }
.app-shell #tabla-conceptos .form-control { min-width: 105px; }
.app-shell #tabla-conceptos td:first-child .form-control { min-width: 220px; }
.direcciones-tooltip { position: relative; display: inline-block; }
.direcciones-tooltip .tooltip-content { display: none; position: absolute; z-index: 2; bottom: 100%; left: 0; width: 260px; padding: 1rem; background: white; border: 1px solid var(--app-border); border-radius: 10px; box-shadow: 0 8px 24px #102b3620; color: #304d57; }
.direcciones-tooltip:hover .tooltip-content, .direcciones-tooltip:focus .tooltip-content { display: block; }
.direccion-item + .direccion-item { border-top: 1px solid var(--app-border); padding-top: .5rem; margin-top: .5rem; }
@media (min-width: 768px) {
    .order-form .direcciones-container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
    .order-form .direcciones-container > h3 { grid-column: 1 / -1; margin-bottom: 0; }
    .order-form .direcciones-container .direccion-grupo { min-width: 0; margin: 0; }
}

/* Listado de órdenes de carga: tabla compacta si cabe, tarjetas si el espacio disponible es estrecho */
.orders-list { container-type: inline-size; }
.orders-select-all-mobile { display: none; }
.app-shell .orders-table th.cell-select, .app-shell .orders-table td.cell-select { width: 44px; text-align: center; }
.app-shell .orders-table th, .app-shell .orders-table td { min-width: 0; padding-left: .55rem; padding-right: .55rem; }
.app-shell .orders-table td { padding-top: .75rem; padding-bottom: .75rem; }
.app-shell .orders-table .cell-id { font-weight: 650; white-space: nowrap; }
.app-shell .orders-table .cell-sub { display: block; margin-top: .15rem; font-size: .72rem; color: var(--app-muted); }
.app-shell .orders-table .cell-ruta { min-width: 200px; }
.app-shell .orders-table .ruta-item { display: flex; gap: .5rem; align-items: flex-start; }
.app-shell .orders-table .ruta-item + .ruta-item { margin-top: .25rem; }
.app-shell .orders-table .ruta-label { flex: 0 0 3.6rem; padding-top: .15rem; font-size: .63rem; font-weight: 650; text-transform: uppercase; letter-spacing: .055em; color: var(--app-muted); }
.app-shell .orders-table .cell-value, .app-shell .orders-table .ruta-item > span:last-child { overflow-wrap: break-word; }
.app-shell .orders-table .cell-cliente { min-width: 110px; }
.app-shell .orders-table .cell-actions { text-align: right; }
.app-shell .orders-table .cell-actions .btn-group { display: inline-grid; grid-template-columns: repeat(2, auto); gap: 4px; }
.app-shell .orders-table .cell-actions .btn { margin: 0 !important; border-radius: 6px !important; }
@media (min-width: 1500px) {
    .app-shell .orders-table .cell-actions .btn-group { grid-template-columns: repeat(4, auto); }
}
@container (max-width: 899.98px) {
    .orders-select-all-mobile { display: block; }
    .app-shell .orders-table-wrap.table-responsive { overflow: visible; background: transparent; border: 0; border-radius: 0; }
    .app-shell .orders-table thead { display: none; }
    .app-shell .orders-table, .app-shell .orders-table tbody, .app-shell .orders-table tr, .app-shell .orders-table td { display: block; width: 100%; }
    .app-shell .orders-table tr { position: relative; margin-bottom: .75rem; padding: .6rem 1rem; background: white !important; border: 1px solid var(--app-border); border-radius: 10px; }
    .app-shell .orders-table td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; min-width: 0; padding: .45rem 0; border: 0; text-align: right; }
    .app-shell .orders-table td + td { border-top: 1px solid #edf2f3; }
    .app-shell .orders-table td::before { content: attr(data-label); flex: 0 0 auto; font-size: .63rem; font-weight: 650; text-transform: uppercase; letter-spacing: .055em; color: #5b737b; text-align: left; }
    .app-shell .orders-table .cell-value { min-width: 0; }
    .app-shell .orders-table td.cell-select { position: absolute; top: .55rem; right: .6rem; width: auto; padding: 0; border: 0; }
    .app-shell .orders-table td.cell-id { justify-content: flex-start; padding-right: 2.5rem; font-size: .95rem; }
    .app-shell .orders-table td.cell-id::before, .app-shell .orders-table td.cell-select::before, .app-shell .orders-table td.cell-actions::before, .app-shell .orders-table .empty-row td::before { content: none; }
    .app-shell .orders-table td.cell-id + td { border-top: 0; }
    .app-shell .orders-table .cell-ruta { min-width: 0; }
    .app-shell .orders-table td.cell-id { border-top: 0; }
    .app-shell .orders-table td.cell-ruta::before { content: none; }
    .app-shell .orders-table td.cell-ruta .cell-value { width: 100%; }
    .app-shell .orders-table .ruta-item { justify-content: space-between; gap: 1rem; }
    .app-shell .orders-table .ruta-label { flex-basis: auto; padding-top: .1rem; color: #5b737b; }
    .app-shell .orders-table td.cell-actions { justify-content: flex-end; padding-top: .75rem; }
    .app-shell .orders-table .cell-actions .btn-group { grid-template-columns: repeat(4, auto); }
    .app-shell .orders-table td, .app-shell .orders-table td.cell-cliente { min-width: 0; padding-left: 0; padding-right: 0; }
    .app-shell .orders-table .empty-row td { justify-content: center; text-align: center; }
    .app-shell .orders-table .direcciones-tooltip .tooltip-content { left: auto; right: 0; width: min(260px, 80vw); text-align: left; }
}
