.wcoe-card__header .wcoe-toggle{background:#f9fafb;border:1px solid #eee;border-radius:8px;padding:4px 8px}
.wcoe-card__header .wcoe-toggle:hover{background:#f3f4f6}
.wcoe-orders{max-width:980px;margin:0 auto}
.wcoe-toolbar{display:flex;gap:8px;align-items:center;margin-bottom:12px;flex-wrap:nowrap}
.wcoe-toolbar .wcoe-search{flex:1 1 220px;min-width:120px;padding:8px;height:40px;width:auto!important;max-width:none}
.wcoe-period{padding:6px;height:40px;width:160px!important;flex:0 0 160px}
.wcoe-toolbar .button{height:40px;padding:0 12px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;color:#1a202c;font-weight:600;display:inline-flex;align-items:center;white-space:nowrap;width:auto!important;flex:0 0 auto}
.wcoe-toolbar .button:hover{background:#fff;border-color:var(--amigo-accent,#ffba00);color:#1a202c}

/* Improve controls visibility */
.wcoe-toolbar .wcoe-search{border:1px solid #e5e7eb;border-radius:8px;background:#fff}
.wcoe-period{border:1px solid #e5e7eb;border-radius:8px;background:#fff}

.wcoe-card{border:1px solid #e2e8f0;border-radius:8px;margin-bottom:12px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.06),0 0 0 1px rgba(0,0,0,.04)}
.wcoe-card__header{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;position:relative}
.wcoe-card__left{display:flex;align-items:center;gap:16px;flex:1;padding-right:44px}
.wcoe-card__title{display:flex;flex-direction:column;gap:6px}
.wcoe-meta-line{display:flex;gap:10px;align-items:center;color:#718096;font-size:13px;font-weight:600}
.wcoe-num{color:#1a202c;font-weight:700}
.wcoe-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-weight:700;font-size:14px;line-height:1;color:#1a202c;background:#f1f5f9}
.wcoe-status-emoji{margin-right:6px}
.wcoe-status-label{color:#1a202c}

/* Accent color variable for future use */
:root{--amigo-accent:#ffba00}

/* Status color mapping */
.wcoe-status--completed{background:#e6f6e6;color:#1f7a1f}
.wcoe-status--processing{background:#e6f1ff;color:#1d4ed8}
.wcoe-status--pending{background:#f3f4f6;color:#374151}
.wcoe-status--on-hold{background:#fff7e6;color:#b45309}
.wcoe-status--cancelled{background:#ffe8e8;color:#c81e1e}
.wcoe-status--failed{background:#ffe8e8;color:#c81e1e}
.wcoe-status--refunded{background:#f3e8ff;color:#6d28d9}

/* Custom statuses */
.wcoe-status--auto-confirmed{background:#fff3cc;color:#8a5800}
.wcoe-status--in-approval{background:#eef2ff;color:#3730a3}
.wcoe-status--to-picking{background:#fff7e6;color:#b45309}
.wcoe-status--packed-dispatched{background:#fff1e0;color:#9a3412}
.wcoe-status--np-terminal{background:#f3e8ff;color:#6d28d9}
.wcoe-status--in-transit{background:#e0f2ff;color:#075985}
.wcoe-status--ready-pickup{background:#e6fffa;color:#065f46}
.wcoe-status--refused{background:#fee2e2;color:#b91c1c}
.wcoe-toggle{position:absolute;top:12px;right:12px;margin:0;border:none!important;background:transparent!important;appearance:none;-webkit-appearance:none;-moz-appearance:none;box-shadow:none!important;padding:4px 6px;display:flex;align-items:center;justify-content:center;font-size:16px;cursor:pointer;color:#6b7280;transition:color .15s ease;border-radius:999px}
.wcoe-toggle[aria-expanded="true"]{transform:none}
.wcoe-card__thumbs{display:flex;gap:6px}
.wcoe-thumb{position:relative;display:inline-flex}
.wcoe-card__thumbs img{width:40px;height:40px;object-fit:cover;border-radius:6px}
.wcoe-thumb--more::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.35);border-radius:6px}
.wcoe-thumb__overlay{position:absolute;inset:auto 0 0 0;transform:translateY(-50%);top:50%;text-align:center;color:#fff;font-weight:600;font-size:12px;}
.wcoe-toggle{border:none!important;background:transparent!important;font-size:18px;cursor:pointer;color:#6b7280}
.wcoe-toggle:hover{color:#374151}
.wcoe-card__body{padding:12px;border-top:1px solid #e2e8f0}
.wcoe-actions{display:flex;gap:8px;margin-bottom:12px}

.wcoe-items{width:100%;margin:8px 0;table-layout:fixed}
.wcoe-items th,.wcoe-items td{padding:8px;border-bottom:1px solid #edf2f7}
.wcoe-items td{vertical-align:middle}
.wcoe-items td:first-child{width:60px}
.wcoe-items td:last-child{width:40px;text-align:right;white-space:nowrap}
.wcoe-item-thumb img{width:60px;height:60px;object-fit:cover}
.wcoe-item-name{word-break:break-word;overflow-wrap:anywhere}
.wcoe-item-qty{text-align:right;white-space:nowrap;width:1%}
.wcoe-item-name .wcoe-product-link{color:#1a202c!important;text-decoration:none!important}
.wcoe-item-name .wcoe-product-link:hover,.wcoe-item-name .wcoe-product-link:focus{color:#1a202c!important;text-decoration:none!important}

.wcoe-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.wcoe-summary .wcoe-points{margin-left:8px;background:#edf2ff;color:#2b50aa;padding:2px 6px;border-radius:999px;font-size:12px;font-weight:600}
.wcoe-delivery .wcoe-delivery-row{display:flex;gap:8px;margin:4px 0;flex-wrap:wrap}
.wcoe-delivery .wcoe-delivery-row > strong{min-width:120px}

.wcoe-status-block{margin:16px 0}
.wcoe-status-chip{display:inline-block;background:#ff62a6;color:#fff;padding:6px 12px;border-radius:20px;font-weight:600;margin-bottom:8px}
.wcoe-timeline{position:relative;margin-top:12px;padding-left:18px}
.wcoe-tl-row{position:relative;display:flex;gap:12px;margin:8px 0}
.wcoe-tl-row:not(:last-child)::before{content:"";position:absolute;left:4px;top:16px;bottom:-16px;width:2px;background:#b7e3a1}
.wcoe-tl-dot{width:12px;height:12px;border-radius:50%;background:#4caf50;display:inline-block;margin-top:3px}
.wcoe-tl-label{font-weight:600}
.wcoe-tl-date{color:#6b7280;font-size:12px}
.wcoe-tl-more{padding-left:0}
.wcoe-route-toggle{background:#eef6ff;border:1px solid #cfe1ff;color:#1e3a8a;border-radius:12px;padding:2px 8px;font-size:12px;cursor:pointer}

.wcoe-modal{position:fixed;inset:0;z-index:1000}
.wcoe-modal[hidden]{display:none}
.wcoe-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.4)}
.wcoe-modal__dialog{position:relative;background:#fff;margin:10vh auto;max-width:560px;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.2)}
.wcoe-modal__header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;border-bottom:1px solid #eee}
.wcoe-modal__body{padding:16px}
.wcoe-review-item{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px;border:1px solid #eceff3;border-radius:8px;margin-bottom:8px;background:#fff}
.wcoe-review-title{font-weight:600;flex:1}
.wcoe-review-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:8px;border:1px solid var(--amigo-accent,#ffba00);background:var(--amigo-accent,#ffba00);color:#111827;text-decoration:none;font-weight:700}

.wcoe-pagination{display:flex;gap:8px;justify-content:center;margin:20px 0;flex-wrap:wrap}
.wcoe-page{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#1a202c;text-decoration:none;font-weight:600;transition:all .15s ease}
.wcoe-page:hover{border-color:var(--amigo-accent,#ffba00);box-shadow:0 1px 3px rgba(0,0,0,.06)}
.wcoe-card:hover{box-shadow:0 2px 8px rgba(0,0,0,.08),0 0 0 1px rgba(0,0,0,.04)}
.wcoe-page.is-current{background:var(--amigo-accent,#ffba00);color:#111827;border-color:var(--amigo-accent,#ffba00)}
.wcoe-page.is-disabled{opacity:.5;pointer-events:none}

/* Primary action buttons in the card */
.wcoe-actions .button,.wcoe-track{display:inline-flex;align-items:center;gap:6px;padding:8px 14px;border-radius:8px;border:1px solid var(--amigo-accent,#ffba00);background:var(--amigo-accent,#ffba00);color:#111827;text-decoration:none;font-weight:700;transition:transform .05s ease, box-shadow .15s ease}
.wcoe-actions .button:hover,.wcoe-track:hover{box-shadow:0 2px 6px rgba(0,0,0,.12)}
.wcoe-actions .button:active,.wcoe-track:active{transform:translateY(1px)}
.wcoe-actions .button.button-secondary{background:#fff;color:#1a202c}

@media (max-width:640px){
  /* Keep one-line toolbar on small screens too */
  .wcoe-toolbar{flex-wrap:nowrap}
  .wcoe-toolbar .wcoe-search{flex:1 1 auto;min-width:120px}
  .wcoe-period{width:140px}
  .wcoe-toolbar .button{flex:0 0 auto}
  .wcoe-summary{grid-template-columns:1fr}
  /* Keep header row layout on mobile; toggle absolutely positioned */
  .wcoe-card__header{flex-direction:row;align-items:flex-start}
  .wcoe-card__left{flex-direction:column;align-items:flex-start}
  .wcoe-delivery .wcoe-delivery-row{flex-direction:column}
  .wcoe-delivery .wcoe-delivery-row > strong{min-width:0}
  .wcoe-recipient div{word-break:break-word}
  .wcoe-actions{flex-direction:column}
  .wcoe-actions .button{width:100%}
  /* Keep rows single-line without breaking table semantics on mobile */
  .wcoe-items thead{display:table-header-group}
  .wcoe-item-thumb{margin-bottom:0}
  .wcoe-item-thumb img{width:48px;height:48px}
}


