.cto-mobile-wrap {
    max-width: 680px;
    margin: 24px auto;
    padding: 0 14px;
    box-sizing: border-box;
}

.cto-mobile-form {
    display: grid;
    gap: 16px;
}

.cto-mobile-intro {
    display: grid;
    gap: 3px;
    margin-bottom: 2px;
}

.cto-mobile-intro strong {
    font-size: 1.35rem;
}

.cto-mobile-intro span {
    opacity: .75;
}

.cto-mobile-form label {
    display: grid;
    gap: 7px;
    font-weight: 600;
}

.cto-mobile-form input,
.cto-mobile-form textarea {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 16px;
    padding: 13px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
}

.cto-mobile-form textarea {
    resize: vertical;
}

.cto-mobile-form small {
    font-weight: 400;
    opacity: .7;
    line-height: 1.35;
}

.cto-mobile-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.cto-mobile-submit,
.cto-mobile-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: #222;
    color: #fff;
}

.cto-secondary {
    background: #ececec;
    color: #222;
}

.cto-mobile-message {
    padding: 14px 16px;
    border-radius: 10px;
    background: #f4f4f4;
}

.cto-success {
    background: #e9f7ec;
}

.cto-error {
    background: #fdecec;
}

.cto-mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 480px) {
    .cto-mobile-two,
    .cto-mobile-actions {
        grid-template-columns: 1fr;
    }

    .cto-mobile-wrap {
        margin-top: 14px;
    }
}


.cto-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.cto-pin-logout {
    font-size: .9rem;
    text-decoration: none;
    opacity: .7;
    padding: 4px 0;
}

.cto-pin-form {
    max-width: 420px;
    margin: 40px auto 0;
}


.cto-dashboard-wrap {
    max-width: 860px;
    margin: 22px auto;
    padding: 0 14px 30px;
    box-sizing: border-box;
}

.cto-dashboard-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.cto-dashboard-top > div {
    display: grid;
    gap: 2px;
}

.cto-dashboard-top > div strong {
    font-size: 1.45rem;
}

.cto-dashboard-top > div span {
    opacity: .55;
    font-size: .85rem;
}

.cto-dashboard-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 14px 0 8px;
}

.cto-dashboard-search input,
.cto-dashboard-search button,
.cto-order-edit-form select {
    min-height: 46px;
    box-sizing: border-box;
    font: inherit;
    font-size: 16px;
    border-radius: 10px;
}

.cto-dashboard-search input,
.cto-order-edit-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfcfcf;
    background: #fff;
}

.cto-dashboard-search button {
    border: 0;
    padding: 0 18px;
    background: #222;
    color: #fff;
    font-weight: 700;
}

.cto-dashboard-links {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    opacity: .7;
    font-size: .9rem;
}

.cto-order-list {
    display: grid;
    gap: 9px;
}

.cto-order-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #dedede;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.cto-order-card-main,
.cto-order-card-side {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cto-order-card-main strong {
    overflow-wrap: anywhere;
}

.cto-order-card-main span {
    opacity: .7;
    font-size: .92rem;
}

.cto-order-card-side {
    justify-items: end;
    text-align: right;
    flex-shrink: 0;
}

.cto-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f0f0f0;
    font-size: .78rem;
    font-weight: 700;
}

.cto-dashboard-actions {
    margin: 10px 0 14px;
}

.cto-order-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.cto-order-heading strong {
    font-size: 1.25rem;
}

.cto-order-heading span {
    opacity: .5;
    font-size: .85rem;
}

.cto-attachment-note {
    padding: 12px 14px;
    border-radius: 10px;
    background: #f4f4f4;
    font-size: .9rem;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .cto-order-card {
        align-items: flex-start;
    }

    .cto-order-card-side {
        max-width: 42%;
    }

    .cto-dashboard-search {
        grid-template-columns: 1fr;
    }
}


.cto-customer-wrap {
    max-width: 720px;
    margin: 24px auto;
    padding: 0 14px 34px;
    box-sizing: border-box;
}
.cto-customer-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 18px;
}
.cto-customer-head strong { font-size: 1.5rem; }
.cto-customer-head span { opacity: .55; }
.cto-customer-summary {
    display: grid;
    gap: 10px;
    margin: 16px 0 22px;
}
.cto-customer-summary > div {
    padding: 13px 14px;
    border: 1px solid #ddd;
    border-radius: 11px;
    background: #fff;
    display: grid;
    gap: 4px;
}
.cto-customer-summary span { font-size: .82rem; opacity: .65; }
.cto-customer-summary strong { line-height: 1.4; }
.cto-check-row {
    display: flex !important;
    align-items: flex-start;
    gap: 10px !important;
    font-weight: 400 !important;
}
.cto-check-row input {
    width: 20px !important;
    height: 20px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.cto-customer-link-box {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #fff;
}
.cto-customer-link-box > span { font-weight: 700; }
.cto-link-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 11px 12px;
    border: 1px solid #ccc;
    border-radius: 9px;
}
.cto-link-actions,
.cto-email-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cto-link-actions button,
.cto-link-actions a,
.cto-email-actions button {
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: #222;
    color: #fff;
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cto-email-actions button {
    background: #ececec;
    color: #222;
}


.cto-private-files-box {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #fff;
}

.cto-private-files-head {
    display: grid;
    gap: 2px;
}
.cto-private-files-head span {
    font-size: .88rem;
    opacity: .65;
}

.cto-private-files-list {
    display: grid;
    gap: 10px;
}

.cto-private-file-card {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.cto-private-file-preview {
    display: block;
    width: 78px;
    height: 78px;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f2f2;
}
.cto-private-file-preview img,
.cto-customer-file-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cto-private-file-icon {
    width: 100%;
    height: 100%;
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    font-weight: 800;
    border-radius: 8px;
}

.cto-private-file-meta {
    min-width: 0;
    display: grid;
    gap: 4px;
    align-content: start;
}
.cto-private-file-meta strong {
    overflow-wrap: anywhere;
}
.cto-private-file-meta span,
.cto-private-file-meta small {
    font-size: .85rem;
    opacity: .72;
}

.cto-private-file-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.cto-private-file-actions form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.cto-private-file-actions button,
.cto-private-upload-form button {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 8px 11px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cto-delete-file {
    background: #fde8e8;
    color: #9e1b1b;
}

.cto-file-switch {
    display: inline-flex !important;
    grid-template-columns: none !important;
    flex-direction: row !important;
    align-items: center;
    gap: 7px !important;
    font-weight: 400 !important;
}
.cto-file-switch input {
    width: 20px !important;
    height: 20px;
    flex: 0 0 auto;
}

.cto-private-upload-form {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}
.cto-private-upload-form label:first-of-type {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.cto-private-upload-form input[type=file] {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

.cto-customer-files {
    display: grid;
    gap: 10px;
    margin: 18px 0 22px;
}
.cto-customer-file-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.cto-customer-file-card {
    display: grid;
    gap: 7px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.cto-customer-file-card img,
.cto-customer-file-card .cto-private-file-icon {
    aspect-ratio: 1 / 1;
    min-height: 0;
    border-radius: 9px;
    border: 1px solid #e0e0e0;
}
.cto-customer-file-card span {
    font-size: .82rem;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .cto-customer-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.cto-mobile-form select {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 16px;
    padding: 13px 14px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
}

.cto-delivery-fields {
    display: grid;
    gap: 16px;
}
.cto-delivery-fields[hidden] {
    display: none !important;
}

.cto-main-image-wrap {
    margin: 2px 0 16px;
}
.cto-main-image-button {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    border-radius: 14px;
    overflow: hidden;
}
.cto-main-image-button img {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.cto-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.cto-gallery-card {
    min-width: 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.cto-gallery-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f2;
    cursor: zoom-in;
    text-decoration: none;
    color: inherit;
}
.cto-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cto-pdf-thumb {
    font-weight: 800;
    cursor: pointer;
}
.cto-gallery-meta {
    display: grid;
    gap: 3px;
    padding: 9px;
}
.cto-gallery-meta strong,
.cto-gallery-meta span {
    overflow-wrap: anywhere;
}
.cto-gallery-meta span {
    font-size: .78rem;
    opacity: .72;
}
.cto-gallery-actions {
    display: grid;
    gap: 6px;
    padding: 0 9px 9px;
}
.cto-gallery-actions form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.cto-gallery-actions button {
    min-height: 36px;
    border: 0;
    border-radius: 7px;
    padding: 7px 9px;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}

.cto-lightbox[hidden] {
    display: none !important;
}
.cto-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.cto-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.84);
}
.cto-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(1100px, 96vw);
    max-height: 92vh;
    display: grid;
    gap: 10px;
    justify-items: center;
}
.cto-lightbox-image {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
}
.cto-lightbox-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #111;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}
.cto-lightbox-title {
    color: #fff;
    text-align: center;
    font-size: .95rem;
}
body.cto-lightbox-open {
    overflow: hidden;
}

.cto-customer-file-card {
    border: 0;
    padding: 0;
    background: transparent;
    text-align: left;
    cursor: zoom-in;
}

@media (max-width: 700px) {
    .cto-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cto-main-image-button img {
        max-height: 280px;
    }
}


.cto-order-card {
    grid-template-columns: 72px minmax(0, 1fr) auto;
}
.cto-order-card-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 72px;
}
.cto-order-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cto-order-card-thumb span {
    font-size: 28px;
}

@media (max-width: 520px) {
    .cto-order-card {
        gap: 10px;
    }
    .cto-order-card-thumb {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }
}

.cto-order-card {
    display: grid;
}


.cto-order-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.cto-order-card-thumb {
    width: 72px;
    height: 72px;
    border: 0;
    padding: 0;
    cursor: zoom-in;
}
.cto-order-card-thumb-empty {
    cursor: default;
}

.cto-order-card-link {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.cto-order-name-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.cto-cake-type {
    font-size: .82rem;
    font-weight: 600;
    opacity: .72;
}

@media (max-width: 520px) {
    .cto-order-card {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .cto-order-card-link {
        gap: 8px;
    }

    .cto-order-name-line {
        display: grid;
        gap: 2px;
    }
}


.cto-order-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

.cto-order-toolbar a {
    font-size: .88rem;
    font-weight: 600;
}

.cto-order-finish-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e1e1e1;
}

.cto-complete-action,
.cto-secondary-action {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cto-complete-action {
    background: #e7f2e9;
    color: #294b31;
}

.cto-secondary-action {
    background: #ededed;
    color: inherit;
}


.cto-order-action-form {
    margin: 0;
}

.cto-status-done {
    opacity: .72;
}


.cto-order-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 12px;
    padding: 4px;
    border-radius: 11px;
    background: #f2f2f2;
}

.cto-order-tab {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    color: inherit;
}

.cto-order-tab.is-active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

@media (max-width: 520px) {
    .cto-order-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .cto-order-tab {
        font-size: .9rem;
        padding: 9px 6px;
    }
}


.cto-order-number {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .03em;
    opacity: .72;
}
.cto-order-list-meta { font-size: .86rem; }

.cto-cake-details {
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
    overflow: hidden;
}
.cto-cake-details > summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 800;
    list-style-position: inside;
    background: #f4f4f4;
}
.cto-cake-details[open] > summary { border-bottom: 1px solid #ddd; }

.cto-cake-section {
    display: grid;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid #e6e6e6;
}
.cto-cake-section:last-child { border-bottom: 0; }

.cto-cake-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cto-add-tier, .cto-remove-tier {
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.cto-add-tier { padding: 8px 10px; background: #ededed; }

.cto-tier-list { display: grid; gap: 10px; }
.cto-tier-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 1fr 38px;
    gap: 8px;
    align-items: end;
}
.cto-tier-row label { display: grid; gap: 5px; min-width: 0; }
.cto-tier-row input { width: 100%; box-sizing: border-box; }
.cto-remove-tier { height: 44px; font-size: 22px; background: #f6e6e6; }

.cto-design-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.cto-order-number-admin { margin-bottom: 14px; font-size: 18px; }

@media (max-width: 760px) {
    .cto-tier-row {
        grid-template-columns: 1fr 1fr;
        padding: 10px;
        border: 1px solid #e2e2e2;
        border-radius: 10px;
        background: #fff;
    }
    .cto-tier-row .cto-remove-tier {
        grid-column: 1 / -1;
        width: 100%;
        height: 38px;
    }
    .cto-design-checks { grid-template-columns: 1fr; }
}


.cto-documents-box {
    display: grid;
    gap: 14px;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}
.cto-documents-head strong {
    display: block;
    font-size: 1.05rem;
}
.cto-documents-head span {
    font-size: .84rem;
    opacity: .68;
}
.cto-document-list {
    display: grid;
    gap: 8px;
}
.cto-document-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid #e4e4e4;
    border-radius: 9px;
    background: #fafafa;
}
.cto-document-row > div:first-child {
    display: grid;
    gap: 2px;
}
.cto-document-row span {
    font-size: .8rem;
    opacity: .7;
}
.cto-document-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cto-document-actions a {
    font-size: .84rem;
    font-weight: 700;
}
.cto-document-create-form {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.cto-document-create-form label {
    display: grid;
    gap: 6px;
}
.cto-document-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.cto-document-create-actions button {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #ededed;
}
.cto-document-create-actions .cto-document-invoice {
    background: #e6f0ea;
}
.cto-document-create-form small {
    opacity: .7;
    line-height: 1.35;
}
@media (max-width: 560px) {
    .cto-document-row {
        align-items: flex-start;
        flex-direction: column;
    }
}


.cto-version-box,
.cto-whatsapp-box {
    display: grid;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid #ddd;
    border-radius: 11px;
    background: #fafafa;
}
.cto-version-box > div:first-child {
    display: grid;
    gap: 2px;
}
.cto-version-box span {
    font-size: .84rem;
    opacity: .72;
}
.cto-version-history {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}
.cto-version-history > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #e5e5e5;
}

.cto-whatsapp-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cto-whatsapp-actions a,
.cto-dashboard-quicklinks a {
    display: inline-block;
    padding: 9px 11px;
    border-radius: 8px;
    background: #edf4ee;
    text-decoration: none;
    font-weight: 700;
}

.cto-document-tax-note {
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: 8px;
    background: #f4f4f4;
}
.cto-document-tax-note span {
    font-size: .82rem;
    opacity: .7;
}
.cto-extra-lines {
    display: grid;
    gap: 7px;
}
.cto-extra-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px 80px 38px;
    gap: 7px;
}
.cto-extra-line input,
.cto-extra-line select {
    width: 100%;
    box-sizing: border-box;
}
.cto-add-extra,
.cto-remove-extra {
    border: 0;
    border-radius: 8px;
    min-height: 38px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #ededed;
}
.cto-remove-extra {
    font-size: 20px;
    background: #f6e6e6;
}
.cto-payment-mini {
    display: block;
    font-size: .72rem;
    opacity: .65;
    white-space: nowrap;
}

.cto-dashboard-quicklinks {
    margin: 8px 0 10px;
}

.cto-production-list {
    display: grid;
    gap: 10px;
}
.cto-production-card {
    display: grid;
    grid-template-columns: 90px minmax(0,1fr);
    gap: 12px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 11px;
    background: #fff;
}
.cto-production-image {
    width: 90px;
    height: 90px;
    border: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 9px;
    background: #f1f1f1;
    cursor: zoom-in;
}
.cto-production-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cto-production-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: default;
}
.cto-production-info {
    display: grid;
    gap: 3px;
    align-content: start;
}
.cto-production-info > span {
    font-size: .84rem;
    opacity: .76;
}

@media (max-width: 620px) {
    .cto-extra-line {
        grid-template-columns: 1fr 95px 70px 36px;
    }
}


/* v1.0.2 – schnell erfassbare Termin- und Lieferhinweise in der Auftragsübersicht */
.cto-order-overview-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.cto-order-overview-meta .cto-order-number-inline {
    font-size: .82rem;
    opacity: .66;
}

.cto-order-overview-meta .cto-date-badge,
.cto-order-overview-meta .cto-delivery-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    opacity: 1;
}

.cto-order-overview-meta .cto-date-badge {
    background: #e9f1ef;
    color: #486d65;
}

.cto-order-overview-meta .cto-delivery-badge {
    background: #f7eadb;
    color: #9a5c22;
}

.cto-order-card.cto-order-card-delivery {
    border-color: #d8a46b;
    box-shadow: inset 4px 0 0 #d8a46b;
}

.cto-order-card.cto-order-card-delivery:hover {
    border-color: #c88c4d;
}

@media (max-width: 520px) {
    .cto-order-overview-meta {
        gap: 5px;
    }

    .cto-order-overview-meta .cto-date-badge,
    .cto-order-overview-meta .cto-delivery-badge {
        font-size: .74rem;
    }
}


/* v1.0.3 – Direktnavigation aus Produktion und Google Maps für Lieferungen */
.cto-production-order-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.cto-production-order-link:hover {
    opacity: .72;
}

.cto-production-map-row {
    margin-top: 3px;
}

.cto-map-link {
    display: inline-block;
    font-weight: 700;
    text-decoration: none;
}

.cto-map-link:hover {
    text-decoration: underline;
}

.cto-delivery-map-link {
    text-decoration: none;
    cursor: pointer;
}

.cto-delivery-map-link:hover {
    text-decoration: underline;
}


/* v1.0.6 – zweiter Speichern-Button im oberen Auftragsbereich */
.cto-save-mid {
    display: flex;
    justify-content: flex-end;
    margin: 4px 0 12px;
}

.cto-save-mid-button {
    min-height: 42px;
    padding: 9px 16px;
    border: 0;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #ededed;
}

.cto-save-mid-button:hover {
    filter: brightness(.97);
}

@media (max-width: 560px) {
    .cto-save-mid {
        justify-content: stretch;
    }

    .cto-save-mid-button {
        width: 100%;
    }
}


/* v1.0.7 – Lieferungen auch in der Produktionsansicht sofort erkennbar */
.cto-production-card.cto-production-card-delivery {
    border-color: #d8a46b;
    box-shadow: inset 4px 0 0 #d8a46b;
    background: #fffdfa;
}

.cto-production-meta-row {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.cto-production-delivery-badge,
.cto-production-pickup-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
}

.cto-production-delivery-badge {
    background: #f7eadb;
    color: #9a5c22;
}

.cto-production-pickup-badge {
    background: #eef2f1;
    color: #63716d;
}


/* v1.0.8 – Neuer Auftrag direkt aus Übersicht und Produktion */
.cto-dashboard-quicklinks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cto-primary-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 13px !important;
    border-radius: 9px;
    background: #d6a09a !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800 !important;
    letter-spacing: .01em;
}

.cto-primary-action:hover {
    filter: brightness(.96);
}

.cto-production-head-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 620px) {
    .cto-dashboard-quicklinks,
    .cto-production-head-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cto-primary-action {
        width: 100%;
        box-sizing: border-box;
    }
}


/* v1.0.9 – Auftragskarten: Platz besser nutzen, besonders mobil */
.cto-order-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    cursor: pointer;
}

.cto-order-card-thumb {
    width: 82px;
    height: 82px;
    flex-basis: 82px;
}

.cto-order-card-content {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: center;
}

.cto-order-card-topline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.cto-order-overview-meta {
    margin-top: 0;
}

.cto-order-number-inline {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.cto-order-card:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

@media (max-width: 520px) {
    .cto-order-card {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        min-height: 120px;
    }

    .cto-order-card-thumb {
        width: 96px;
        height: 96px;
        flex-basis: 96px;
        align-self: start;
    }

    .cto-order-card-content {
        gap: 9px;
        width: 100%;
    }

    .cto-order-card-topline {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
    }

    .cto-order-name-line {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .cto-order-card-main strong {
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .cto-order-card-side {
        max-width: none;
        min-width: 92px;
        gap: 5px;
    }

    .cto-order-card-side > strong {
        font-size: 1rem;
        white-space: nowrap;
    }

    .cto-payment-mini {
        white-space: normal;
        max-width: 125px;
        line-height: 1.25;
    }

    .cto-order-overview-meta {
        grid-column: 1 / -1;
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
        align-items: center;
        width: 100%;
    }

    .cto-order-overview-meta .cto-order-number-inline {
        flex: 0 0 auto;
        font-size: .76rem;
    }

    .cto-order-overview-meta .cto-date-badge {
        flex: 0 0 auto;
    }

    .cto-order-overview-meta .cto-delivery-badge {
        flex: 1 1 100%;
        width: fit-content;
        max-width: 100%;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    .cto-order-card.cto-order-card-delivery {
        box-shadow: inset 5px 0 0 #d8a46b;
    }
}


/* v1.1.0 – Produktionsblatt PDF */
.cto-production-pdf-link {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cto-card-action-link {
    flex: 0 0 auto;
}


/* v1.1.1 – TimeTree */
.cto-timetree-link {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cto-card-mini-actions,
.cto-production-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 520px) {
    .cto-card-mini-actions {
        flex: 1 1 100%;
    }
}
