:root {
    --ink: #1a1714;
    --muted: #6b7280;
    --soft: #9e9e9e;
    --shell: #f0ece7;
    --paper: #ffffff;
    --line: #e4dfd9;
    --field: #f5f2ee;
    --green: #2e7d32;
    --green-dark: #0d1f14;
    --blue: #1565c0;
    --orange: #e65100;
    --red: #d32f2f;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background: #d9d4cc;
    color: var(--ink);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
}

.hidden,
.is-hidden {
    display: none !important;
}

.fulfillment-shell {
    width: 100%;
    max-width: min(520px, 100vw);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    margin: 0 auto;
    background: var(--shell);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.app-header {
    min-height: 62px;
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 12px;
    background: var(--green-dark);
    color: #ffffff;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.app-header h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
}

.header-actions {
    display: flex;
    gap: 8px;
    justify-self: end;
    margin-left: auto;
}

.icon-button {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
}

.icon-button:active {
    transform: scale(0.98);
}

.screen-root {
    width: 100%;
    min-width: 0;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.scroll-view {
    width: 100%;
    min-width: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card,
.field-card {
    background: var(--paper);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.field-card {
    padding: 11px 14px;
}

.field-card label,
.setting-label,
.tiny-label {
    display: block;
    margin-bottom: 4px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

input,
select {
    width: 100%;
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: var(--field);
    color: var(--ink);
    padding: 8px 10px;
    font-weight: 700;
    outline: none;
}

input[type="date"] {
    background: transparent;
    padding: 0;
    min-height: 28px;
}

.date-card {
    display: grid;
    grid-template-columns: 38px 1fr;
    align-items: center;
    gap: 12px;
}

.field-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: #e8f5e9;
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.orders-list {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 82px;
}

.order-card {
    width: 100%;
    min-width: 0;
    padding: 13px 15px;
    border: 2px solid transparent;
    cursor: pointer;
}

.salesapp-source-badge {
    width: fit-content;
    margin-top: 8px;
    padding: 3px 7px;
    border-radius: 4px;
    background: #e8f2ff;
    color: #1f5f9d;
    font-size: 11px;
    font-weight: 700;
}

.link-order-button {
    width: 100%;
    margin-top: 10px;
}

.link-order-modal select {
    width: 100%;
    border: 0;
    background: transparent;
    color: #17221a;
    font: inherit;
    font-weight: 700;
}

.link-order-preview,
.link-order-warning,
.link-order-empty {
    display: grid;
    gap: 3px;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 8px;
}

.link-order-preview {
    background: #edf7ef;
    color: #265b32;
}

.link-order-warning {
    margin: 10px;
    border: 1px solid #e6b45b;
    background: #fff6df;
    color: #73551c;
}

.link-order-empty {
    background: #f3f1ee;
    color: #716b65;
    font-size: 12px;
    font-weight: 700;
}

.link-order-preview span,
.link-order-warning span {
    font-size: 12px;
    line-height: 1.4;
}

.link-order-preview-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.link-order-items {
    display: grid;
    gap: 7px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid rgba(38, 91, 50, 0.16);
}

.link-order-item {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.link-order-item-icons {
    display: flex;
    align-items: center;
}

.link-order-item-icons img {
    width: 31px;
    height: 31px;
    border: 2px solid #ffffff;
    border-radius: 7px;
    background: #ffffff;
    object-fit: cover;
}

.link-order-item-icons img + img {
    margin-left: -8px;
}

.link-order-item-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.link-order-item-copy strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-order-item > b {
    font-size: 12px;
    white-space: nowrap;
}

.order-card.is-loading {
    border-color: rgba(230, 81, 0, 0.35);
}

.order-top {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.order-top h2 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 800;
}

.order-top h2 span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.status-pill,
.count-pill,
.net-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.truck-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 8px;
    background: var(--field);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
}

.truck-line > :last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-top h2 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-status-group {
    min-width: 0;
    flex-shrink: 0;
}

.truck-line span:last-child {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.summary-chips,
.net-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    background: var(--field);
    border-radius: 10px;
}

.summary-chip img,
.slot-icons img,
.pick-card img,
.net-row img {
    width: 30px;
    height: 26px;
    border-radius: 5px;
    object-fit: cover;
}

.summary-chip img:first-child,
.slot-icons img:first-child,
.pick-card img:first-child,
.net-row img:first-child {
    object-fit: contain;
}

.progress-track {
    height: 5px;
    margin-top: 9px;
    overflow: hidden;
    background: var(--shell);
    border-radius: 999px;
}

.progress-bar {
    height: 100%;
    border-radius: inherit;
    background: var(--orange);
}

.progress-text {
    margin-top: 3px;
    color: var(--orange);
    font-size: 10px;
    font-weight: 800;
    text-align: right;
}

.fab {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4);
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
}

.form-grid {
    display: grid;
    gap: 10px;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 126px;
    gap: 10px;
}

.suggest-wrap {
    position: relative;
}

.suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    overflow: hidden;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.suggestions button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f4f1ed;
    background: #ffffff;
    padding: 10px 14px;
    color: var(--ink);
    font-weight: 700;
    text-align: left;
}

.bottom-bar {
    flex-shrink: 0;
    padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 12px);
    background: var(--shell);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bottom-bar .grow {
    flex: 1;
}

.plan-page-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.plan-page-scroll .planner-layout {
    min-height: auto;
    flex: none;
}

.plan-page-scroll .slot-scroll {
    min-height: auto;
    overflow: visible;
}

.plan-page-scroll > .bottom-bar {
    margin-top: 10px;
}

.bottom-bar-content {
    width: 100%;
}

.bottom-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-scroll-view {
    padding-bottom: 16px;
}

.settings-save-bar {
    flex-shrink: 0;
    padding: 9px 14px calc(env(safe-area-inset-bottom, 0px) + 10px);
    border-top: 1px solid var(--line);
    background: var(--shell);
}

.settings-save-bar .primary-button {
    width: 100%;
}

.primary-button,
.secondary-button,
.danger-button,
.blue-button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}

.primary-button {
    background: var(--green);
    color: #ffffff;
}

.blue-button {
    background: var(--blue);
    color: #ffffff;
}

.secondary-button {
    background: #e8e3dc;
    color: var(--muted);
}

.danger-button {
    background: #ffebee;
    color: var(--red);
}

.primary-button:disabled,
.blue-button:disabled {
    background: #d8d3cd;
    color: #aaa39b;
    cursor: default;
}

.plan-head {
    padding: 10px 13px 0;
    display: grid;
    gap: 7px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.info-card {
    min-width: 0;
    padding: 9px 11px;
}

.info-card span {
    display: block;
    margin-bottom: 2px;
    color: var(--soft);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.info-card strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-field-card {
    display: block;
    margin: 0;
}

.plan-field-card select,
.plan-field-card input {
    width: 100%;
    min-width: 0;
    height: 28px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.plan-field-card select:disabled,
.plan-field-card input:disabled {
    color: var(--ink);
    opacity: 1;
    -webkit-text-fill-color: var(--ink);
}

.plan-field-card.is-full {
    width: 100%;
}

.separator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 7px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.separator::before,
.separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #d8d3cd;
}

.planner-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
}

.planner-layout.has-panel .slot-scroll {
    padding-bottom: calc(var(--planner-panel-height, 520px) + 12px);
}

.slot-scroll {
    min-height: 0;
    overflow-y: auto;
    padding: 0 11px 10px;
}

.slot-grid {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.slot-row {
    display: grid;
    grid-template-columns: 1fr 1fr 44px;
    align-items: center;
    gap: 6px;
}

.slot-card {
    min-height: 110px;
    border: 2px dashed #c8c3bd;
    border-radius: 12px;
    background: var(--field);
    color: #c8c3bd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.slot-card.is-filled {
    border-style: solid;
}

.slot-card.is-selected {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
}

.slot-row-label {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    text-align: right;
}

.slot-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    height: 100%;
    padding: 7px;
}

.slot-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.slot-icons img {
    width: 54px;
    height: 46px;
}

.slot-count {
    color: #333333;
    font-size: 15px;
    font-weight: 800;
}

.weight-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.add-weight {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
}

.planner-panel {
    display: none;
    position: absolute;
    left: 50%;
    right: auto;
    bottom: 0;
    width: min(calc(100% - 22px), 498px);
    transform: translateX(-50%);
    z-index: 30;
    padding: 10px 10px 12px;
    border: 1px solid rgba(228, 223, 217, 0.95);
    border-radius: 16px 16px 14px 14px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.planner-panel.is-open {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.panel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.panel-top strong {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.panel-close {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: var(--field);
    color: var(--soft);
    font-size: 18px;
    font-weight: 800;
}

.pick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.pick-card {
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #f9f7f5;
    padding: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--ink);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.pick-card img {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    border-radius: 7px;
    object-fit: contain;
}

.pick-card span,
.pick-card small {
    min-width: 0;
}

.pick-card.is-active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.product-picks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.product-picks .pick-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 6px;
    font-size: 10px;
    text-align: left;
}

.selection-tools {
    display: flex;
    gap: 6px;
}

.selection-tools button {
    flex: 1;
}

.auto-select-count {
    width: 68px;
    flex: 0 0 68px;
}

.auto-select-count input {
    width: 100%;
    min-height: 42px;
    padding: 8px 6px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--field);
    color: var(--ink);
    font-weight: 800;
    text-align: center;
}

.auto-select-count input:focus {
    border-color: var(--blue);
    outline: none;
}

.multiselect-button.is-active {
    background: var(--blue);
    color: #ffffff;
}

.multiselect-button.is-active::before {
    content: "✓";
    margin-right: 6px;
    font-weight: 800;
}

.add-row-button {
    width: calc(100% - 44px);
    min-height: 40px;
    border: 2px dashed #c8c3bd;
    border-radius: 12px;
    background: transparent;
    color: var(--soft);
    font-size: 12px;
    font-weight: 800;
}

.remaining-label {
    color: var(--soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.remaining-value {
    font-size: 17px;
    font-weight: 800;
}

.net-card {
    margin-bottom: 8px;
    padding: 9px 10px;
}

.net-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.net-row span:nth-last-child(2) {
    flex: 1;
    color: #555555;
    font-size: 13px;
    font-weight: 800;
}

.tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 13px 8px;
}

.tabs + .scroll-view {
    padding: 0 13px 16px;
}

.tab-button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

.tab-button.is-active {
    background: var(--green);
    color: #ffffff;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-card {
    padding: 12px 13px;
}

.setting-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.setting-head h2,
.product-setting h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
}

.setting-note {
    margin: 5px 0 0;
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

.sync-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-top: 5px;
    padding: 0 7px;
    border-radius: 999px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.setting-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: end;
}

.inline-number {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--field);
    border-radius: 9px;
    padding: 5px 8px;
}

.inline-number input {
    min-height: 28px;
    padding: 0;
    text-align: right;
}

.inline-number span {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
}

.inline-number.is-readonly {
    background: #f1f5f9;
}

.inline-number input:disabled {
    color: #64748b;
    -webkit-text-fill-color: #64748b;
    opacity: 1;
}

.toggle {
    width: 44px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #c8c3bd;
    padding: 2px;
    cursor: pointer;
}

.toggle:disabled {
    cursor: default;
    opacity: 0.62;
}

.toggle::before {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease;
}

.toggle.is-on {
    background: #4caf50;
}

.toggle.is-on::before {
    transform: translateX(18px);
}

.product-setting {
    overflow: hidden;
}

.product-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-bottom: 1px solid #f5f2ee;
}

.product-head img {
    width: 42px;
    height: 34px;
    border-radius: 7px;
    object-fit: cover;
}

.product-head h2 {
    flex: 1;
}

.product-head > div {
    flex: 1;
    min-width: 0;
}

.config-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 86px 42px;
    gap: 7px;
    align-items: center;
    padding: 8px 13px;
    border-bottom: 1px solid #fafafa;
}

.config-row strong {
    font-size: 11px;
    line-height: 1.25;
}

.empty-state {
    padding: 46px 20px;
    color: #aaa39b;
    text-align: center;
    font-weight: 800;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.42);
}

.modal-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
    border-radius: 22px 22px 0 0;
    background: #ffffff;
}

.modal-grip {
    width: 38px;
    height: 4px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: var(--line);
}

.modal-card h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
}

.modal-card p {
    margin: 0 0 14px;
    color: var(--soft);
    font-size: 12px;
    font-weight: 700;
}

.weight-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px;
    border-radius: 13px;
    background: var(--field);
}

.weight-mode-tabs label {
    cursor: pointer;
}

.weight-mode-tabs input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.weight-mode-tabs span {
    min-height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.weight-mode-tabs input:checked + span {
    background: #ffffff;
    color: var(--blue);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.weight-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    padding: 12px 16px;
    border-radius: 13px;
    background: var(--field);
}

.weight-input input {
    min-height: 46px;
    padding: 0;
    background: transparent;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
}

.weight-input span {
    color: var(--soft);
    font-size: 18px;
    font-weight: 800;
}

.weight-mode-hint {
    min-height: 28px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.install-prompt {
    margin: 10px 14px 0;
    padding: 11px 12px;
    border-radius: 13px;
    background: #ffffff;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.install-prompt.compact {
    margin: 12px 0 0;
}

.install-prompt strong {
    display: block;
    font-size: 13px;
}

.install-prompt p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--shell);
}

.auth-card {
    width: min(100%, 420px);
    padding: 22px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.auth-card h1 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
}

.auth-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.auth-form {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form label {
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.link-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.form-message {
    min-height: 18px;
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
}

@media (min-width: 760px) {
    body {
        padding: 28px 0;
    }

    .fulfillment-shell {
        height: calc(100vh - 56px);
        height: calc(100dvh - 56px);
        min-height: 0;
        border-radius: 30px;
        overflow: hidden;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    }

    .planner-layout.has-panel {
        grid-template-columns: minmax(0, 1fr);
    }

}

/* Order Fulfillment v3 */
.app-header {
    min-height: 58px;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 18px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.app-header.has-back {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.app-header h1 {
    font-size: 20px;
    letter-spacing: 0;
}

.app-header .icon-button {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.selection-count {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    font-size: 11px;
    font-weight: 700;
}

.bottom-nav {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-shrink: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e8e3dc;
    background: #ffffff;
}

.bottom-nav button {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    color: #b0aaa5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    cursor: pointer;
}

.bottom-nav button.is-active {
    color: var(--green);
}

.bottom-nav span {
    font-size: 10px;
    font-weight: 700;
}

.scroll-view {
    padding: 14px;
}

.orders-screen {
    gap: 10px;
}

.date-card {
    padding: 11px 14px;
    gap: 12px;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.date-card .field-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e8f5e9;
    color: var(--green);
}

.date-weekday {
    display: block;
    margin-top: 2px;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
}

.orders-list {
    gap: 10px;
    padding-bottom: 76px;
}

.order-card {
    padding: 13px 15px;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

.order-card.is-loading {
    border-color: rgba(255, 143, 0, 0.4);
}

.order-card.is-forecast {
    border-left: 4px solid #1976d2;
    background: #f8fbff;
}

.order-card.is-loaded {
    border-color: #66bb6a;
    border-left-width: 5px;
    background: #f1f9f2;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.14);
}

.order-card.is-loaded .truck-line {
    background: #e1f1e4;
}

.order-card.is-loaded .status-pill {
    gap: 4px;
    outline: 1px solid rgba(46, 125, 50, 0.2);
}

.order-card.is-loaded .status-pill::before {
    content: '\2713';
    font-size: 11px;
    font-weight: 900;
}

.delivery-progress-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
    margin: 10px 0 4px;
}

.delivery-progress-strip > span {
    min-width: 0;
    padding: 6px 3px;
    border-top: 3px solid #d8ddda;
    color: #78817b;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.delivery-progress-strip small {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.delivery-progress-strip .is-current {
    border-color: #2876bd;
    color: #1e66a8;
}

.delivery-progress-strip .is-done {
    border-color: #329956;
    color: #287f47;
}

.plan-page-scroll > .delivery-progress-strip {
    padding: 0 14px;
}

.forecast-mini-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.order-status-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-status-group time {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.orders-empty {
    padding: 40px 20px;
}

.orders-empty span {
    display: block;
    margin-bottom: 10px;
    font-size: 40px;
}

.orders-empty strong {
    color: #b0aaa5;
    font-size: 14px;
}

.truck-line {
    margin-bottom: 8px;
    padding: 7px 10px;
    border-radius: 10px;
}

.summary-chip {
    padding: 5px 9px 5px 6px;
    border-radius: 10px;
}

.summary-chip img {
    width: 28px;
    height: 24px;
}

.fab {
    bottom: 18px;
    right: 18px;
    width: 52px;
    height: 52px;
    box-shadow: 0 4px 18px rgba(46, 125, 50, 0.5);
}

.calendar-screen {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 8px;
    gap: 10px;
}

.calendar-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.calendar-month-nav button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    color: #4a4a4a;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.calendar-month-nav strong {
    font-size: 16px;
    font-weight: 800;
}

.calendar-view-filter {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 5px;
    border-radius: 12px;
    background: #4b4742;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.calendar-view-filter button {
    min-width: 0;
    min-height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.calendar-view-filter button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.calendar-view-filter button.is-orders.is-active {
    background: #2e7d32;
    color: #ffffff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.calendar-view-filter button.is-deliveries.is-active {
    background: #1565c0;
    color: #ffffff;
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.28);
}

.calendar-days {
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 70px;
}

.calendar-day {
    padding: 11px 12px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.calendar-day.is-today {
    border-color: var(--green);
}

.calendar-day-head {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.calendar-day-number {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    background: var(--field);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
}

.is-today .calendar-day-number {
    background: var(--green);
    color: #ffffff;
}

.calendar-weekday {
    flex: 1;
    font-size: 13px;
    font-weight: 800;
}

.calendar-weekday small {
    display: block;
    margin-top: 1px;
    color: var(--green);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-day-head > button {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: var(--field);
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}

.calendar-sections {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 9px;
}

.calendar-sections.is-empty {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.calendar-sections.is-empty.is-single {
    grid-template-columns: 1fr;
}

.calendar-section {
    min-width: 0;
    padding: 7px;
    border-left: 3px solid;
    border-radius: 8px;
}

.calendar-section.is-orders {
    border-left-color: #43a047;
    background: #f1f8f2;
}

.calendar-section.is-deliveries {
    border-left-color: #1e88e5;
    background: #f0f6fc;
}

.calendar-section-head {
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.calendar-section-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: grid;
    place-items: center;
}

.calendar-section-icon svg {
    width: 13px;
    height: 13px;
}

.is-orders .calendar-section-icon {
    background: #d8eddb;
    color: #237b37;
}

.is-deliveries .calendar-section-icon {
    background: #d9eafb;
    color: #1769aa;
}

.calendar-section-head strong {
    color: #49443f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.calendar-section-count {
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.8);
    color: #716b65;
    display: inline-grid;
    place-items: center;
    font-size: 9px;
    font-weight: 800;
}

.calendar-orders {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}

.calendar-order {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    border: 1px solid #d8d2cb;
    border-left: 4px solid #2e7d32;
    border-radius: 10px;
    padding: 8px 9px 8px 8px;
    background: #ffffff;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(42, 35, 29, 0.12);
}

.calendar-order.is-forecast {
    border-color: #90caf9;
    border-left-color: #1976d2;
    background: #f5faff;
}

.calendar-order.is-loaded {
    border-color: #81c784;
    border-left: 4px solid #2e7d32;
    background: #edf8ef;
    box-shadow: 0 2px 7px rgba(32, 105, 48, 0.16);
}

.calendar-order.is-loaded .calendar-client::before {
    content: '\2713\00a0';
    font-weight: 900;
}

.calendar-order-main {
    min-width: 0;
    flex: 1;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.calendar-copy-button {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
}

.calendar-client {
    padding: 4px 10px;
    border-radius: 20px;
    background: #236b38;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: 0 1px 3px rgba(22, 82, 43, 0.22);
}

.calendar-product {
    padding: 2px 7px 2px 3px;
    border-radius: 8px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.calendar-product img {
    width: 18px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}

.calendar-screen + .fab {
    bottom: 18px;
}

.plan-head {
    padding: 10px 13px 0;
    gap: 6px;
}

.info-grid {
    gap: 6px;
}

.info-card {
    min-height: 44px;
    padding: 8px 11px;
    border-radius: 11px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-card span {
    font-size: 9px;
}

.info-card strong {
    font-size: 13px;
}

.info-card.with-icon {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    align-items: center;
}

.info-card.with-icon .info-icon {
    grid-row: 1 / 3;
}

.info-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-style: normal;
}

.info-icon.is-orange {
    background: #fff3e0;
    color: #e65100;
}

.info-icon.is-blue {
    background: #e3f2fd;
    color: #1565c0;
}

.info-icon.is-green {
    background: #e8f5e9;
    color: #2e7d32;
}

.info-icon.is-date {
    background: #f1efec;
    color: #5f5a55;
}

.plan-date-card input {
    min-width: 0;
    min-height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 800;
}

.order-date-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.order-date-fields .field-card {
    min-width: 0;
}

.order-date-fields input {
    width: 100%;
    min-width: 0;
}

.plan-date-grid .plan-date-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-grid {
    gap: 10px;
}

.order-type-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
    background: #e7e2dc;
}

.order-type-control button {
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #77706a;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.order-type-control button.is-active {
    background: #ffffff;
    color: #1a1714;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.order-type-control button:last-child.is-active {
    color: #1565c0;
}

.forecast-editor {
    padding: 12px;
    border: 2px solid #90caf9;
    border-radius: 14px;
    background: #f5faff;
}

.forecast-editor-head,
.forecast-line-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.forecast-editor-head {
    margin-bottom: 10px;
}

.forecast-editor-head strong {
    font-size: 14px;
}

.forecast-editor-head > button {
    min-height: 32px;
    border: 0;
    border-radius: 9px;
    padding: 6px 10px;
    background: #1565c0;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.forecast-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.forecast-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d5e8f8;
    border-radius: 10px;
    background: #ffffff;
}

.forecast-line.has-error {
    border-color: #ffcdd2;
}

.forecast-line-head,
.forecast-line-result {
    grid-column: 1 / -1;
}

.forecast-line-head strong {
    font-size: 11px;
}

.forecast-line-head button {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    background: #ffebee;
    color: #d32f2f;
    font-size: 18px;
    cursor: pointer;
}

.quick-order-editor {
    border-color: #a5d6a7;
    background: #f4fbf5;
}

.quick-order-line {
    border-color: #d7ead9;
}

.linked-order-state {
    margin: 0 14px 12px;
    padding: 11px 12px;
    border: 1px solid #cfe3d2;
    border-radius: 10px;
    background: #f4faf5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.linked-order-state > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.linked-order-state span,
.linked-order-state small {
    color: #5d6e61;
    font-size: 11px;
    font-weight: 700;
}

.linked-order-state strong {
    color: #1f4f2b;
    font-size: 13px;
}

.linked-order-state.has-changes {
    border-color: #f0bd62;
    background: #fff8e8;
}

.linked-order-state.has-changes strong {
    color: #8a5200;
}

.linked-order-state button {
    min-height: 36px;
    border: 0;
    border-radius: 8px;
    padding: 7px 10px;
    background: #e89012;
    color: #ffffff;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.order-change-badge {
    width: fit-content;
    margin-top: 7px;
    border-radius: 6px;
    padding: 4px 7px;
    background: #fff3e0;
    color: #9a5700;
    font-size: 10px;
    font-weight: 800;
}

.forecast-line label:last-of-type {
    grid-column: 1 / -1;
}

.forecast-line select,
.forecast-line input {
    min-width: 0;
    min-height: 38px;
    font-size: 12px;
}

.forecast-weight-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
}

.forecast-weight-input > span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.forecast-line-result {
    color: #1565c0;
    font-size: 10px;
    font-weight: 800;
}

.forecast-line-result.is-error {
    color: #d32f2f;
}

.forecast-preview {
    margin-top: 9px;
    padding: 10px;
    border-radius: 9px;
    display: grid;
    gap: 2px;
    font-size: 11px;
}

.forecast-preview.is-empty {
    background: #ffffff;
    color: #8c857e;
}

.forecast-preview.is-valid {
    background: #e8f5e9;
    color: #2e7d32;
}

.forecast-preview.is-error {
    background: #ffebee;
    color: #c62828;
}

.forecast-preview strong {
    font-size: 13px;
}

.forecast-order-banner {
    padding: 8px 10px;
    border-left: 4px solid #1976d2;
    border-radius: 9px;
    background: #eaf4fd;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.forecast-order-banner > div span,
.forecast-order-banner > div strong {
    display: block;
}

.forecast-order-banner > div span {
    color: #5c7892;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.forecast-order-banner > div strong {
    color: #0d4777;
    font-size: 11px;
}

.forecast-order-banner > b {
    grid-column: 1 / -1;
    color: #c62828;
    font-size: 10px;
}

.forecast-order-banner.is-error {
    border-left-color: #d32f2f;
    background: #ffebee;
}

.copy-date-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
}

.copy-date-list {
    min-height: 48px;
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
}

.copy-date-list > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-radius: 8px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
    font-weight: 800;
}

.copy-date-list > span button {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 5px;
    background: rgba(21, 101, 192, 0.12);
    color: #1565c0;
    cursor: pointer;
}

.copy-date-empty {
    color: #9e9e9e;
    font-size: 11px;
    font-weight: 700;
}

.form-grid .field-card {
    padding: 11px 14px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.form-grid input {
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 15px;
}

.form-grid select,
.transport-form select {
    width: 100%;
    min-height: 28px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-weight: 700;
}

.field-card.has-warning {
    border: 1px solid #ffb74d;
}

.transport-field-warning {
    display: block;
    margin-top: 5px;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
}

.transport-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(92px, 1fr));
    gap: 6px;
    overflow-x: auto;
    margin-bottom: 12px;
}

.transport-tabs button {
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    background: #e8e3dc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.transport-tabs button.is-active {
    background: #dbeafe;
    color: #1565c0;
}

.transport-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.transport-toolbar .primary-button {
    min-height: 36px;
    padding: 7px 11px;
}

.transport-list {
    display: grid;
    gap: 8px;
}

.transport-record {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.transport-row-actions {
    width: 104px;
    flex: 0 0 104px;
    display: grid;
    gap: 6px;
}

.transport-row-actions .secondary-button,
.transport-row-actions .danger-button {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 11px;
}

.transport-record.is-inactive {
    opacity: 0.55;
}

.vehicle-photo {
    width: 58px;
    height: 44px;
    flex: 0 0 58px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--field);
    display: grid;
    place-items: center;
    font-size: 22px;
}

.vehicle-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transport-record-main {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 3px;
}

.transport-record-main strong,
.transport-record-main span {
    overflow-wrap: anywhere;
}

.transport-record-main strong {
    font-size: 14px;
}

.transport-record-main > span,
.transport-muted {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
}

.transport-record-main em {
    color: #b45309;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.trip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.trip-list span {
    padding: 3px 6px;
    border-radius: 6px;
    background: #edf7ef;
    color: #2e7d32;
    font-size: 10px;
    font-weight: 800;
}

.transport-modal {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
}

.transport-form {
    display: grid;
    gap: 9px;
    margin: 14px 0;
}

.transport-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    font-size: 13px;
    font-weight: 800;
}

.transport-check input {
    width: 20px;
    height: 20px;
}

.photo-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    align-items: center;
}

.photo-actions img,
.photo-actions > span {
    grid-column: 1 / -1;
    width: 100%;
    max-height: 180px;
    border-radius: 8px;
    object-fit: cover;
    text-align: center;
}

.photo-actions .danger-button {
    grid-column: 1 / -1;
}

.transport-modal-note,
.transport-inactive-note {
    color: var(--soft);
    font-size: 11px;
    font-weight: 700;
}

.transport-record-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.transport-reassign-modal {
    display: grid;
    gap: 12px;
}

.transport-reassign-modal > p {
    margin-bottom: 0;
    line-height: 1.5;
}

.transport-reassign-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.transport-reassign-counts > div {
    min-width: 0;
    padding: 9px;
    border-radius: 8px;
    background: #f3f1ee;
    display: grid;
    gap: 3px;
}

.transport-reassign-counts span {
    color: var(--soft);
    font-size: 10px;
    font-weight: 700;
}

.transport-reassign-counts strong {
    color: #2c2926;
    font-size: 17px;
}

.transport-reassign-warning,
.transport-reassign-empty {
    padding: 10px 11px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.transport-reassign-warning {
    border: 1px solid #e7bd72;
    background: #fff7e8;
    color: #76531d;
}

.transport-reassign-empty {
    border: 1px solid #efb6b6;
    background: #fff1f1;
    color: #922d2d;
}

.transport-reassign-modal .danger-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

@media (max-width: 430px) {
    .transport-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .transport-record {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .transport-row-actions {
        width: 100%;
        flex-basis: 100%;
        grid-template-columns: 1fr 1fr;
    }
}

.tabs {
    padding: 10px 13px 8px;
    gap: 8px;
}

.tab-button {
    min-height: 40px;
    padding: 10px;
    border-radius: 12px;
    box-shadow: none;
    font-size: 13px;
}

.settings-list {
    gap: 10px;
}

.setting-card,
.product-setting {
    border-radius: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.settings-logout {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border: 0;
    border-radius: 12px;
    background: #ffebee;
    color: #e53935;
    font-weight: 800;
    cursor: pointer;
}

.form-grid + * {
    flex-shrink: 0;
}

.screen-root > .bottom-bar .secondary-button {
    border: 2px solid #e0dbd5;
    background: transparent;
}

.modal-backdrop {
    position: fixed;
}

.modal-card {
    max-width: 520px;
    padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
    border-radius: 22px 22px 0 0;
}

.separator {
    padding: 7px 14px;
}

.planner-layout,
.planner-layout.has-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 0 11px;
}

.planner-layout.has-panel {
    grid-template-columns: minmax(0, 1fr) 180px;
}

.planner-layout.has-panel .slot-scroll {
    padding-bottom: 8px;
}

.slot-scroll {
    padding: 4px 0 8px;
}

.slot-grid {
    gap: 7px;
}

.slot-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
    gap: 6px;
}

.slot-card {
    min-height: 118px;
    border-radius: 11px;
    transition: min-height 0.25s ease;
}

.has-panel .slot-card {
    min-height: 78px;
}

.has-panel .slot-content {
    gap: 2px;
    padding: 3px;
}

.has-panel .slot-icons {
    gap: 4px;
}

.has-panel .slot-icons img {
    width: 29px;
    height: 25px;
}

.has-panel .slot-count {
    font-size: 10px;
}

.has-panel .weight-pills .count-pill {
    padding: 1px 5px;
    font-size: 8px;
}

.selected-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 9px;
    line-height: 1;
}

.planner-panel {
    display: none;
    position: static;
    width: 180px;
    height: 100%;
    max-height: none;
    transform: none;
    z-index: 1;
    padding: 10px 9px;
    border: 0;
    border-radius: 15px;
    overflow-y: auto;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.1);
}

.planner-panel.is-open {
    display: flex;
    gap: 8px;
}

.panel-top strong {
    font-size: 10px;
}

.panel-close {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 16px;
}

.selection-tools {
    gap: 4px;
}

.selection-tools button {
    min-height: 32px;
    padding: 5px;
    border-radius: 9px;
    font-size: 9px;
}

.auto-select-count {
    width: 48px;
    flex-basis: 48px;
}

.auto-select-count input {
    min-height: 32px;
    padding: 4px;
    border-radius: 9px;
    font-size: 12px;
}

.pick-grid {
    gap: 4px;
}

.pick-card,
.product-picks .pick-card {
    min-width: 0;
    padding: 6px 4px;
    border-radius: 9px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    font-size: 8px;
    line-height: 1.25;
    text-align: center;
}

.pick-card img {
    width: 38px;
    height: 26px;
    flex-basis: 26px;
    border-radius: 4px;
}

.product-picks {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-picks .pick-card {
    flex-direction: row;
    justify-content: flex-start;
    padding: 6px 8px;
    font-size: 10px;
    text-align: left;
}

.product-picks .pick-card img {
    width: 26px;
    height: 22px;
    flex-basis: 22px;
}

.planner-panel > .primary-button {
    min-height: 38px;
    padding: 8px;
    border-radius: 11px;
    font-size: 13px;
}

.bottom-bar {
    padding: 9px 13px calc(env(safe-area-inset-bottom, 0px) + 12px);
}

.net-card {
    padding: 8px 10px;
    border-radius: 11px;
}

@media (max-width: 380px) {
    .planner-layout.has-panel {
        grid-template-columns: minmax(0, 1fr) 166px;
    }

    .planner-panel {
        width: 166px;
    }
}
