.swmco-wrap {
    max-width: 1120px;
    margin: 30px auto;
    direction: ltr !important;
    text-align: left !important;
    font-family: inherit;
    color: #222;
}

.swmco-wrap * {
    box-sizing: border-box;
}

.swmco-page-head,
.swmco-detail-title,
.swmco-order-card-top,
.swmco-form-footer,
.swmco-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.swmco-page-head h2,
.swmco-detail-title h2,
.swmco-panel-head h3,
.swmco-order-name {
    margin: 0 0 6px;
}

.swmco-page-head p,
.swmco-detail-title p,
.swmco-panel-head p {
    margin: 0;
    color: #6b7280;
}

.swmco-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.swmco-order-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    box-shadow: 0 6px 24px rgba(0,0,0,.045);
}

.swmco-order-name {
    font-size: 18px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.swmco-approved {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #067647;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.swmco-order-details {
    display: grid;
    gap: 0;
    margin-top: 18px;
    border-top: 1px solid #f0f1f3;
}

.swmco-data-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.2fr);
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #f0f1f3;
    font-size: 14px;
}

.swmco-data-row span,
.swmco-detail-summary span {
    color: #667085;
}

.swmco-data-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.swmco-open-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 18px;
    padding: 11px 18px;
    border-radius: 10px;
    background: #111827;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
}

.swmco-open-order:hover {
    opacity: .92;
}

.swmco-detail-head {
    margin-bottom: 18px;
}

.swmco-back {
    display: inline-block;
    margin-bottom: 16px;
    text-decoration: none;
    font-weight: 600;
}

.swmco-detail-title {
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.swmco-detail-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.swmco-detail-summary > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.swmco-timezone-note {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475467;
    font-size: 14px;
}

.swmco-meal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 18px;
}

.swmco-meal-tab {
    appearance: none;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 160px;
    border: 1px solid #d0d5dd;
    background: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
}

.swmco-meal-tab small {
    color: #667085;
    font-size: 11px;
    font-weight: 500;
}

.swmco-meal-tab small b {
    font-weight: 700;
}

.swmco-meal-tab.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.swmco-meal-tab.is-active small {
    color: #e5e7eb;
}

.swmco-meal-tab.is-closed,
.swmco-meal-tab:disabled {
    cursor: not-allowed;
    opacity: .58;
    background: #f9fafb;
}

.swmco-meal-panel {
    display: none;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 8px 28px rgba(0,0,0,.04);
}

.swmco-meal-panel.is-active {
    display: block;
}

.swmco-window-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.swmco-window-badge.is-open {
    background: #ecfdf3;
    color: #067647;
}

.swmco-window-badge.is-closed {
    background: #f2f4f7;
    color: #667085;
}

.swmco-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.swmco-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.swmco-field-label {
    font-weight: 700;
}

.swmco-field input[type="number"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
    box-sizing: border-box;
    background: #fff;
    direction: ltr;
    text-align: left;
}

.swmco-field input[type="number"]:focus {
    outline: 2px solid rgba(17,24,39,.12);
    border-color: #667085;
}

.swmco-form-footer {
    margin-top: 24px;
    align-items: flex-end;
}

.swmco-submit {
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    padding: 12px 28px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    min-width: 120px;
}

.swmco-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.swmco-form-message {
    min-height: 24px;
    font-size: 14px;
    font-weight: 600;
}

.swmco-form-message.is-success {
    color: #067647;
}

.swmco-form-message.is-error,
.swmco-error {
    color: #b42318;
}

.swmco-empty,
.swmco-notice {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
}

.swmco-window-closed {
    margin-bottom: 18px;
}

@media (max-width: 720px) {
    .swmco-wrap {
        margin: 20px 12px;
    }

    .swmco-detail-title,
    .swmco-page-head,
    .swmco-form-footer,
    .swmco-panel-head,
    .swmco-order-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .swmco-detail-summary {
        grid-template-columns: 1fr;
    }

    .swmco-data-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .swmco-data-row strong {
        text-align: left;
    }

    .swmco-meal-tab,
    .swmco-submit,
    .swmco-open-order {
        width: 100%;
    }
}

.swmco-delivery-section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.swmco-section-heading {
    margin-bottom: 18px;
}

.swmco-section-heading h3,
.swmco-section-heading h4,
.swmco-cycle-head h3,
.swmco-cycle-head h4,
.swmco-cycle-card h5 {
    margin: 0 0 6px;
}

.swmco-section-heading p,
.swmco-cycle-head p {
    margin: 0;
    color: #667085;
}

.swmco-cycle-card,
.swmco-op-card {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.035);
}

.swmco-cycle-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.swmco-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.swmco-comparison-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 16px;
}

.swmco-comparison-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    text-align: left;
}

.swmco-comparison-table th,
.swmco-comparison-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eaecf0;
    vertical-align: middle;
}

.swmco-comparison-table thead th {
    background: #f9fafb;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.swmco-comparison-table tfoot th {
    background: #f9fafb;
    font-weight: 800;
}

.swmco-pending-value {
    color: #98a2b3;
    font-size: 13px;
    font-weight: 600;
}

.swmco-photo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
}

.swmco-photo-row span {
    color: #475467;
    font-weight: 700;
}

.swmco-photo-link {
    font-weight: 700;
    text-decoration: none;
}

.swmco-receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.swmco-confirm-match,
.swmco-show-mismatch {
    appearance: none;
    border-radius: 10px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.swmco-confirm-match {
    border: 0;
    background: #111827;
    color: #fff;
}

.swmco-show-mismatch {
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
}

.swmco-mismatch-form {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaecf0;
}

.swmco-mismatch-form.is-visible {
    display: block;
}

.swmco-inline-notice {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #475467;
}

.swmco-inline-notice.is-complete {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.swmco-inline-notice.is-warning {
    border-color: #fedf89;
    background: #fffaeb;
    color: #b54708;
}

.swmco-photo-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 22px;
    padding: 16px;
    border: 1px dashed #d0d5dd;
    border-radius: 12px;
    background: #f9fafb;
}

.swmco-photo-field > span {
    font-weight: 800;
}

.swmco-photo-field small,
.swmco-help-text {
    color: #667085;
}

.swmco-photo-field input[type="file"] {
    max-width: 100%;
    margin-top: 4px;
}

.swmco-op-card {
    margin-top: 22px;
}

.swmco-op-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 26px;
    margin: -4px 0 6px;
    color: #475467;
    font-size: 14px;
}

@media (max-width: 720px) {
    .swmco-cycle-head,
    .swmco-photo-row,
    .swmco-receipt-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .swmco-confirm-match,
    .swmco-show-mismatch {
        width: 100%;
    }
}

/* v1.3.0 statistics, filters, and activity history */
.swmco-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin: 18px 0 24px;
}

.swmco-stat-card {
    padding: 16px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
}

.swmco-stat-card span {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.swmco-stat-card strong {
    display: block;
    margin-top: 5px;
    color: #101828;
    font-size: 25px;
    line-height: 1.2;
}

.swmco-filter-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #f9fafb;
}

.swmco-filter-bar label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.swmco-filter-bar label > span {
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}

.swmco-filter-bar input,
.swmco-filter-bar select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #fff;
    padding: 8px 10px;
    color: #101828;
    font: inherit;
}

.swmco-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.swmco-filter-actions button,
.swmco-filter-actions a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    padding: 8px 14px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
}

.swmco-filter-actions button {
    border: 0;
    background: #111827;
    color: #fff;
    cursor: pointer;
}

.swmco-filter-actions a {
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
}

.swmco-activity-section {
    margin-top: 34px;
}

.swmco-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.swmco-activity-card {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) minmax(260px, 2fr) auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
}

.swmco-activity-card > div:first-child span {
    display: block;
    margin-top: 4px;
    color: #667085;
    font-size: 13px;
}

.swmco-activity-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #475467;
    font-size: 13px;
}

.swmco-activity-counts b {
    color: #101828;
}

@media (max-width: 900px) {
    .swmco-activity-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

/* v1.4.0 one submission per meal per day, and the catering acknowledgement step */
.swmco-meal-tab.is-submitted {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.swmco-meal-tab.is-submitted.is-active {
    background: #3730a3;
    border-color: #3730a3;
    color: #fff;
}

.swmco-meal-tab.is-submitted small {
    color: #4f46e5;
}

.swmco-meal-tab.is-submitted.is-active small {
    color: #dbe1ff;
}

.swmco-locked-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background: #f5f6ff;
}

.swmco-locked-banner h3 {
    margin: 0 0 6px;
}

.swmco-locked-banner p {
    margin: 0;
    color: #475467;
}

.swmco-locked-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #3730a3;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.swmco-locked-heading {
    margin: 22px 0 0;
}

.swmco-ack-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #475467;
}

.swmco-ack-block {
    margin-top: 20px;
    padding: 18px;
    border: 1px dashed #c7d2fe;
    border-radius: 12px;
    background: #f5f6ff;
}

.swmco-ack-block h4 {
    margin: 0 0 6px;
}

.swmco-ack-block .swmco-form-footer {
    margin-top: 14px;
}

@media (max-width: 720px) {
    .swmco-locked-banner,
    .swmco-ack-status {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* v1.8.0 difference resolution */
.swmco-resolution-block {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fbfbfd;
}

.swmco-resolution-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.swmco-resolution-head h4 {
    margin: 0;
}

.swmco-resolution-pill {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.swmco-resolution-pill.is-complete {
    background: #edfaef;
    color: #116329;
}

.swmco-resolution-pill.is-warning {
    background: #fcf0f1;
    color: #b32d2e;
}

.swmco-resolution-pill.is-pending {
    background: #fdf3e2;
    color: #8a6116;
}

.swmco-resolution-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
    color: #475467;
    font-size: 13px;
}

.swmco-resolution-form {
    margin-top: 16px;
}

.swmco-resolution-form .swmco-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.swmco-resolution-reason {
    display: block;
    margin-top: 12px;
}

.swmco-resolution-reason textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.swmco-diff-off {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fcf0f1;
    color: #b32d2e;
    font-weight: 700;
}

.swmco-diff-ok {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #edfaef;
    color: #116329;
    font-weight: 700;
}

/* v1.7.0 banner linking the Op-Admin page to the exceptional page */
.swmco-exception-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 18px 0;
    padding: 16px 18px;
    border: 1px solid #f0c33c;
    border-radius: 12px;
    background: #fdf9ea;
}

.swmco-exception-banner strong,
.swmco-exception-banner span {
    display: block;
    color: #7a5b00;
}

.swmco-exception-banner span {
    margin-top: 4px;
}

/* v1.5.0 exceptional requests */
.swmco-locked-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.swmco-open-exceptional {
    background: #3730a3;
}

.swmco-exception-form .swmco-meal-panel {
    margin-top: 18px;
}

.swmco-exception-form .swmco-panel-head h3 {
    margin: 0 0 6px;
}

.swmco-exception-form .swmco-panel-head p {
    margin: 0;
    color: #667085;
}

.swmco-exception-note {
    margin-top: 20px;
}

.swmco-exception-note textarea,
.swmco-exception-note input[type="text"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.swmco-exception-status {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    background: #f8f9ff;
}

.swmco-exception-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.swmco-exception-status-head h3 {
    margin: 0;
}

.swmco-exception-section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}

.swmco-exception-card {
    border-color: #c7d2fe;
}

.swmco-exception-meal-block {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eaecf0;
}

.swmco-exception-meal-block h4,
.swmco-exception-meal-block h5 {
    margin: 0 0 8px;
}

.swmco-exception-card .swmco-form-footer {
    align-items: flex-end;
}

@media (max-width: 720px) {
    .swmco-exception-status-head,
    .swmco-locked-links {
        flex-direction: column;
        align-items: stretch;
    }

    .swmco-open-exceptional {
        text-align: center;
    }
}

/* v1.12.0 op-admin catering change */
.swmco-catering-panel{margin:12px 0;border:1px solid #e4e7ec;border-radius:12px;padding:12px 14px;background:#fafafa}
.swmco-catering-panel summary{display:inline-flex;align-items:center;gap:8px;font-weight:600;cursor:pointer;font-size:13px;color:#1d2327}
.swmco-catering-panel .swmco-field{display:flex;flex-direction:column;gap:5px;margin:0 0 10px}
.swmco-catering-panel select{padding:8px 10px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;max-width:420px}
.swmco-catering-panel textarea{padding:8px 10px;border:1px solid #d0d5dd;border-radius:8px;max-width:640px;font:inherit}
.swmco-catering-history{margin:10px 0}
.swmco-catering-history summary{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border:1px solid #dba617;border-radius:8px;background:#fdf9ea;font-weight:600;cursor:pointer;font-size:13px;color:#8a6116}
.swmco-catering-history-list{padding:10px 12px;border:1px solid #e4e7ec;border-radius:8px;background:#fff;margin-top:8px}
.swmco-catering-history-list p{margin:0 0 6px;color:#475467;font-size:13px}
.swmco-catering-history-list p:last-child{margin-bottom:0}
