.wcidm-v3{max-width:1200px;margin:0 auto;padding:16px;font-family:Arial,sans-serif;color:#111827}
.wcidm-v3-topbar{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 4px 20px rgba(0,0,0,.05);margin-bottom:16px}
.wcidm-v3-topbar__main{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.wcidm-v3-topbar__eyebrow{font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.65;margin-bottom:6px}
.wcidm-v3-topbar__title{margin:0;font-size:28px;line-height:1.2}
.wcidm-v3-topbar__controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.wcidm-v3-badge{display:inline-flex;padding:8px 12px;border-radius:999px;background:#111827;color:#fff;font-weight:700}
.wcidm-v3-topbar__drawer{margin-top:14px;padding-top:14px;border-top:1px solid #e5e7eb}
.wcidm-v3-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.wcidm-v3-kpi{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px}
.wcidm-v3-kpi span{display:block;font-size:12px;opacity:.7;margin-bottom:4px}
.wcidm-v3-kpi strong{font-size:24px}
.wcidm-v3-topbar__tools{margin-top:10px;color:#475569}
.wcidm-v3-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.wcidm-v3-search{width:100%;max-width:420px;padding:12px 14px;border:1px solid #d1d5db;border-radius:14px;background:#fff}
.wcidm-v3-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(310px,1fr));gap:16px}
.wcidm-v3-card,.wcidm-v3-drive-card-inner{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 4px 20px rgba(0,0,0,.05)}
.wcidm-v3-card__top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.wcidm-v3-card__order{font-weight:700;opacity:.75;margin-bottom:4px}
.wcidm-v3-card__name{margin:0;font-size:22px}
.wcidm-v3-card__status{display:inline-flex;align-items:center;justify-content:center;padding:8px 12px;border-radius:999px;background:#e5e7eb;color:#374151;font-weight:700;font-size:12px;border:1px solid rgba(0,0,0,.08);box-shadow:0 2px 8px rgba(0,0,0,.06)}
.wcidm-v3-card__status.is-delivered{background:#16a34a;color:#fff;border-color:#15803d}
.wcidm-v3-card__status.is-partial-delivered{background:#f59e0b;color:#fff;border-color:#d97706}
.wcidm-v3-card__status.is-failed,.wcidm-v3-card__status.is-customer_absent,.wcidm-v3-card__status.is-refused,.wcidm-v3-card__status.is-rescheduled{background:#dc2626;color:#fff;border-color:#b91c1c}
.wcidm-v3-card__address,.wcidm-v3-card__phone{margin-bottom:8px}
.wcidm-v3-card__address-line.is-primary{font-weight:600;line-height:1.5}
.wcidm-v3-card__address-line.is-secondary{opacity:.75;line-height:1.4}
.wcidm-v3-card__phone{direction:ltr;text-align:right;font-weight:600}
.wcidm-v3-card__meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.wcidm-v3-card__meta-chip{display:inline-flex;padding:6px 10px;border-radius:999px;background:#f3f4f6;font-size:12px}
.wcidm-v3-card__items{display:flex;flex-direction:column;gap:8px;padding-top:8px;border-top:1px solid #f3f4f6}
.wcidm-v3-card__item{display:flex;justify-content:space-between;gap:10px;font-size:14px}
.wcidm-v3-card__item-name{font-weight:600}
.wcidm-v3-card__section-title{font-size:12px;text-transform:uppercase;letter-spacing:.06em;opacity:.6;margin:12px 0 8px}
.wcidm-v3-card__quick-actions,.wcidm-v3-card__flow-actions{display:flex;flex-wrap:wrap;gap:8px}
.wcidm-v3-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:12px;text-decoration:none;border:1px solid rgba(0,0,0,.12);background:#fff;color:#111827;cursor:pointer}
.wcidm-v3-btn--primary{background:#111827;color:#fff}
.wcidm-v3-btn--delivered{background:#16a34a;color:#fff;border-color:#15803d}
.wcidm-v3-btn--partial{background:#f59e0b;color:#fff;border-color:#d97706}
.wcidm-v3-btn--failed{background:#dc2626;color:#fff;border-color:#b91c1c}
.wcidm-v3-drive-mode__header{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.wcidm-v3-drive-mode__nav{display:flex;gap:8px;flex-wrap:wrap}
.wcidm-v3-sheet{position:fixed;inset:0;z-index:999999;display:none}
.wcidm-v3-sheet.is-open{display:block}
.wcidm-v3-sheet__overlay{position:absolute;inset:0;background:rgba(17,24,39,.45)}
.wcidm-v3-sheet__panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-top-left-radius:20px;border-top-right-radius:20px;padding:18px;max-height:82vh;overflow:auto;box-shadow:0 -12px 40px rgba(0,0,0,.18)}
.wcidm-v3-sheet__header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:16px}
.wcidm-v3-sheet__title{margin:0;font-size:24px}
.wcidm-v3-sheet__sub,.wcidm-v3-sheet__eyebrow{opacity:.75}
.wcidm-v3-sheet__body{display:flex;flex-direction:column;gap:12px}
.wcidm-v3-sheet__footer{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:18px;padding-top:16px;border-top:1px solid #e5e7eb}
.wcidm-v3-sheet__actions{display:flex;gap:8px;flex-wrap:wrap}
.wcidm-v3-sheet__message{min-height:22px;opacity:.85}
.wcidm-v3-sheet__message.is-error{color:#b91c1c}
.wcidm-v3-sheet__message.is-success{color:#166534}
.wcidm-v3-flow-block{border:1px solid #e5e7eb;border-radius:16px;padding:14px}
.wcidm-v3-flow-block__title{font-weight:700;margin-bottom:6px}
.wcidm-v3-flow-block__sub{color:#475569}
.wcidm-v3-stepper-row{display:flex;justify-content:space-between;gap:12px;align-items:center}
.wcidm-v3-empty{padding:24px;border:1px dashed #cbd5e1;border-radius:16px;background:#fff;text-align:center}
@media(max-width:782px){
  .wcidm-v3{padding:12px}
  .wcidm-v3-topbar__title{font-size:24px}
  .wcidm-v3-list{grid-template-columns:1fr}
  .wcidm-v3-sheet__footer{flex-direction:column;align-items:stretch}
  .wcidm-v3-sheet__actions{width:100%}
  .wcidm-v3-sheet__actions .wcidm-v3-btn{flex:1}
}

.wcidm-v3-topbar__hint{margin-top:6px;color:#475569;font-size:14px}

.wcidm-v3--fallback{max-width:960px;margin:0 auto;padding:16px}

.wcidm-v3-stepper-controls{display:flex;align-items:center;gap:8px}
.wcidm-v3-stepper-btn{width:42px;height:42px;border-radius:12px;border:1px solid #d1d5db;background:#fff;font-size:24px;line-height:1;cursor:pointer}
.wcidm-v3-stepper-input{width:88px;padding:10px;border:1px solid #d1d5db;border-radius:12px;text-align:center;font-size:18px;background:#fff}

.wcidm-v3-card{transition:border-color .25s ease,box-shadow .25s ease,transform .25s ease,background-color .25s ease}
.wcidm-v3-card.is-recent-updated{border-color:#10b981;box-shadow:0 0 0 3px rgba(16,185,129,.18),0 10px 26px rgba(16,185,129,.12);background:#f0fdf4;transform:translateY(-1px)}
.wcidm-v3.is-submitting .wcidm-v3-sheet__panel{cursor:progress}
.wcidm-v3.is-submitting [data-v3-save]{opacity:.85}
.wcidm-v3-sheet__actions button[disabled]{opacity:.65;cursor:not-allowed}


.wcidm-v3-card.is-partial-order{border-color:#f59e0b;background:#fff7e6;box-shadow:0 6px 24px rgba(245,158,11,.10)}
.wcidm-v3-card.is-delivered-order{border-color:#22c55e;background:#f0fdf4;box-shadow:0 6px 24px rgba(34,197,94,.08)}
.wcidm-v3-card.is-failed-order{border-color:#ef4444;background:#fef2f2;box-shadow:0 6px 24px rgba(239,68,68,.08)}
.wcidm-v3-card__helper{display:flex;align-items:center;gap:8px;margin:-2px 0 10px;padding:8px 10px;border-radius:12px;font-size:13px;font-weight:600}
.wcidm-v3-card__helper--partial{background:#fef3c7;color:#92400e}
.wcidm-v3-card__helper--delivered{background:#dcfce7;color:#166534}
.wcidm-v3-card__helper--failed{background:#fee2e2;color:#991b1b}


.wcidm-v3-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.wcidm-v3-toolbar__scope{display:flex;gap:8px;align-items:center}
.wcidm-v3-scope-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:999px;border:1px solid #d1d5db;background:#fff;color:#374151;text-decoration:none;font-weight:700}
.wcidm-v3-scope-btn.is-active{background:#111827;color:#fff;border-color:#111827}
@media (max-width: 640px){
  .wcidm-v3-toolbar__scope{width:100%}
  .wcidm-v3-scope-btn{flex:1}
}

.wcidm-v3-card__status.is-failed,.wcidm-v3-card__status.is-not-delivered,.wcidm-v3-card__status.is-customer_absent,.wcidm-v3-card__status.is-refused,.wcidm-v3-card__status.is-address_issue,.wcidm-v3-card__status.is-rescheduled{background:#dc2626;color:#fff;border-color:#b91c1c}
.wcidm-v3-field{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px 14px;background:#fff;font:inherit;box-sizing:border-box}
.wcidm-v3-field--textarea{min-height:110px;resize:vertical}


.wcidm-v3-topbar [data-v3-toggle-drive].is-active{
  background:#d63f7c;
  color:#fff;
  border-color:#d63f7c;
}

.wcidm-v3-topbar [data-v3-toggle-kpi].is-active,
.wcidm-v3-topbar [data-v3-toggle-drive].is-active{
  background:#1e40af;
  color:#fff;
  border-color:#1e40af;
  box-shadow:0 6px 16px rgba(30,64,175,.22);
}
.wcidm-v3-topbar [data-v3-toggle-kpi].is-active:hover,
.wcidm-v3-topbar [data-v3-toggle-drive].is-active:hover{
  background:#1d4ed8;
  border-color:#1d4ed8;
}


/* v3.5.17 visual state hard sync */
.wcidm-v3-topbar [data-v3-toggle-kpi].is-active,
.wcidm-v3-topbar [data-v3-toggle-drive].is-active{
  background:#1e40af !important;
  color:#fff !important;
  border-color:#1e40af !important;
  box-shadow:0 6px 16px rgba(30,64,175,.22) !important;
}
.wcidm-v3-topbar [data-v3-toggle-kpi].is-active:hover,
.wcidm-v3-topbar [data-v3-toggle-drive].is-active:hover{
  background:#1d4ed8 !important;
  border-color:#1d4ed8 !important;
}

.wcidm-v3-session-banner{margin-top:12px;padding:10px 14px;border-radius:14px;background:#eff6ff;color:#1d4ed8;font-weight:700}
.wcidm-v3-start{max-width:920px;margin:0 auto;padding:24px 16px}
.wcidm-v3-start__card{background:#fff;border:1px solid #e5e7eb;border-radius:28px;padding:24px;box-shadow:0 18px 50px rgba(15,23,42,.06)}
.wcidm-v3-start__title{margin:10px 0 8px;font-size:34px;line-height:1.1;color:#0f172a}
.wcidm-v3-start__subtitle{margin:0 0 14px;color:#475569;font-size:17px;line-height:1.7}
.wcidm-v3-start__status{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#ecfdf5;color:#065f46;font-weight:700;margin-bottom:18px}
.wcidm-v3-start__status.is-muted{background:#f8fafc;color:#475569}
.wcidm-v3-start__actions{display:grid;gap:12px}
.wcidm-v3-start__action{min-height:56px;justify-content:center;font-size:20px}
.wcidm-v3-start__tip{display:grid;gap:6px;padding:16px;border-radius:18px;background:#f8fafc;border:1px solid #e2e8f0;color:#334155;line-height:1.7}
.wcidm-v3-start-sheet[hidden]{display:none !important}
.wcidm-v3-start-sheet{position:fixed;inset:0;z-index:999999}
.wcidm-v3-start-sheet__overlay{position:absolute;inset:0;background:rgba(15,23,42,.55)}
.wcidm-v3-start-sheet__panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:24px 24px 0 0;padding:20px 16px 28px;box-shadow:0 -12px 40px rgba(15,23,42,.18);max-width:760px;margin:0 auto}
.wcidm-v3-start-sheet__header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.wcidm-v3-start-sheet__form{display:grid;gap:12px}
.wcidm-v3-start-sheet__form label{display:grid;gap:6px;font-weight:700;color:#0f172a}
.wcidm-v3-start-sheet__form input{min-height:48px;border:1px solid #cbd5e1;border-radius:14px;padding:0 14px;font-size:16px}
.wcidm-v3-start-sheet__message{min-height:22px;color:#334155}
.wcidm-v3-start-sheet__message.is-error{color:#b91c1c}
@media (max-width: 640px){
  .wcidm-v3-start__title{font-size:28px}
  .wcidm-v3-start__subtitle{font-size:15px}
}
