/* Public tracking: restore the former shop identity and detailed order hierarchy. */
.c-layout:has([data-view="account"]:not([hidden])) { grid-template-columns: minmax(0, 1fr); max-width: 1220px; }
.co-tracking { --co-accent: var(--c-accent-text, var(--shop-primary)); min-width: 0; }
.co-icon { width: 22px; height: 22px; flex: none; vertical-align: middle; }
.co-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.45fr); gap: 14px; margin-block: 24px 32px; }
.co-stats article { display: flex; align-items: center; gap: 12px; padding: 20px 16px; background: var(--shop-surface); border: 1px solid var(--shop-line); border-radius: 16px; min-width: 0; }
.co-stat-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; background: var(--shop-primary-soft); color: var(--co-accent); }
.co-stats small { display: block; font-size: 11px; color: var(--shop-muted); margin-block-end: 5px; }
.co-stats strong { font-size: 23px; font-weight: 750; line-height: 1.5; }
.co-stats article:last-child strong { font-size: 16px; }
.co-stat-clock { color: #925300; background: #fff3d9; }
.co-stat-card { color: #6950a4; background: #f0ebfa; }
.co-stat-box { color: #266394; background: #eaf4ff; }
.co-section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-block-end: 16px; }
.co-section-title span { display: block; color: var(--co-accent); font-size: 11px; font-weight: 700; margin-block-end: 4px; }
.customer-app .co-section-title h2 { font-size: 20px; margin: 0; }
.co-section-title p { font-size: 12px; color: var(--shop-muted); margin: 0; }
.co-shop-chips { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 5px 4px 14px; scrollbar-width: thin; scrollbar-color: var(--shop-line-strong) transparent; }
.co-shop-chips button { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; max-width: 300px; min-height: 78px; border: 1px solid var(--shop-line); border-radius: 16px; padding: 12px 16px; background: var(--shop-surface); color: var(--shop-text); text-align: start; font-size: 13px; font-weight: 650; }
.co-shop-chips button:hover { border-color: var(--co-accent); }
.co-shop-chips button[aria-pressed="true"] { background: var(--shop-primary-faint); border-color: var(--co-accent); box-shadow: inset 0 0 0 1px var(--co-accent); }
.co-shop-chips button > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.co-shop-chips small { display: block; color: var(--shop-muted); font-size: 11px; font-weight: 400; margin-block-start: 3px; }
.co-logo { display: grid; place-items: center; position: relative; width: 48px; height: 48px; flex: none; border: 1px solid var(--shop-line); border-radius: 13px; background: var(--shop-surface-2); color: var(--shop-muted); overflow: hidden; }
.co-logo img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 4px; object-fit: contain; background: #fff; }
.co-all { color: var(--co-accent); background: var(--shop-primary-soft); border-color: transparent; }
.co-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-block: 16px 4px; padding-block: 18px; border-block: 1px solid var(--shop-line); }
.co-filter-fields { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.co-filter { display: block; font-size: 11px; font-weight: 600; min-width: 160px; }
.co-filter select { display: block; width: 100%; max-width: 280px; min-height: 46px; padding: 8px 12px; margin-block-start: 6px; border: 1px solid var(--shop-line-strong); border-radius: 10px; background: var(--shop-surface); color: var(--shop-text); font-size: 13px; }
.co-toolbar p { margin: 0 0 10px; color: var(--shop-muted); font-size: 11px; }
.co-feedback { min-height: 22px; margin: 8px 0 12px !important; color: var(--shop-muted); font-size: 11px; }
.co-tracking [data-orders][aria-busy="true"] { opacity: .55; }
.co-shop-group { margin-block-end: 30px; border: 1px solid var(--shop-line); border-radius: 20px; background: var(--shop-surface); overflow: clip; }
.co-shop-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-block-end: 1px solid var(--shop-line); background: var(--shop-surface-2); }
.co-shop-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.co-shop-identity > div { min-width: 0; }
.co-shop-identity span:not(.co-logo) { color: var(--shop-muted); font-size: 10px; }
.customer-app .co-shop-identity h2 { font-size: 17px; margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.co-visit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex: none; font-size: 11px; color: var(--co-accent) !important; border-radius: 8px; padding-inline: 8px; }
.co-visit:hover { background: var(--shop-primary-soft); }
.co-visit .co-icon { width: 17px; }
.co-order { --co-tone: var(--co-accent); --co-soft: var(--shop-primary-faint); }
.co-order.is-waiting { --co-tone: #925300; --co-soft: #fff7e8; }
.co-order.is-shipped { --co-tone: #266394; --co-soft: #eff7ff; }
.co-order.is-cancelled { --co-tone: #ac363d; --co-soft: #fff2f3; }
.co-order + .co-order { border-block-start: 1px solid var(--shop-line); }
.co-order > summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(130px, .8fr) minmax(100px, .6fr) 24px; align-items: center; gap: 16px; list-style: none; cursor: pointer; padding: 22px 24px; transition: background .15s; }
.co-order > summary::-webkit-details-marker, .co-history > summary::-webkit-details-marker { display: none; }
.co-order > summary:hover { background: var(--shop-primary-faint); }
.co-order > summary:focus-visible { outline-offset: -4px; border-radius: 10px; }
.co-order-mark { width: 42px; height: 42px; border: 1px solid var(--shop-line); border-radius: 13px; display: grid; place-items: center; color: var(--co-tone); background: var(--co-soft); }
.co-order-id, .co-order-amount { min-width: 0; }
.co-order-id b, .co-order-amount b { display: block; font-size: 14px; font-weight: 700; }
.co-order-id small, .co-order-amount small { display: block; color: var(--shop-muted); font-size: 11px; margin-block-start: 4px; }
.co-order-amount b { white-space: nowrap; }
.co-status { color: var(--co-tone); background: var(--co-soft); border-radius: 8px; font-size: 11px; font-weight: 650; padding: 5px 9px; text-align: center; justify-self: start; }
.co-chevron { color: var(--shop-muted); }
.co-order[open] > summary .co-chevron { transform: rotate(180deg); }
.co-detail { padding: 0 24px 24px; }
.co-detail h4 { margin: 0 0 8px; font-size: 13px; line-height: 1.8; }
.co-current { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px; background: var(--co-soft); border: 1px solid color-mix(in srgb, var(--co-tone) 15%, transparent); }
.co-current > span { color: var(--co-tone); }
.co-current > span .co-icon { width: 32px; height: 32px; }
.co-current small { font-size: 10px; color: var(--co-tone); }
.co-current h4 { margin-block: 0 3px; color: var(--co-tone); font-size: 16px; }
.co-current p { font-size: 12px; margin: 0; color: var(--shop-text); }
.co-progress { display: flex; list-style: none; padding: 0; margin: 24px 0; }
.co-progress li { position: relative; display: flex; flex: 1; align-items: center; flex-direction: column; gap: 7px; text-align: center; min-width: 0; }
.co-progress li:not(:last-child)::after { content: ''; position: absolute; inset-block-start: 16px; inset-inline-start: calc(50% + 20px); width: calc(100% - 40px); height: 2px; background: var(--shop-line); }
.co-progress li.is-done::after { background: var(--co-accent); }
.co-progress li > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--shop-line); border-radius: 50%; color: var(--shop-muted); background: var(--shop-surface); }
.co-progress .co-icon { width: 16px; height: 16px; }
.co-progress b { font-size: 10px; font-weight: 500; color: var(--shop-muted); }
.co-progress .is-done > span { background: var(--shop-primary-soft); color: var(--co-accent); border-color: var(--co-accent); }
.co-progress .is-current > span { background: var(--shop-primary); color: var(--shop-on-primary); border-color: var(--shop-primary); box-shadow: 0 0 0 4px var(--shop-primary-soft); }
.co-progress .is-current b { color: var(--co-accent); font-weight: 700; }
.co-info-grid { display: grid; grid-template-columns: .8fr 1.3fr 1fr; gap: 14px; margin-block: 24px; }
.co-info-grid > section { padding: 16px; border: 1px solid var(--shop-line); border-radius: 12px; min-width: 0; }
.co-info-grid h4 { display: flex; gap: 7px; align-items: center; color: var(--shop-muted); font-size: 11px; font-weight: 500; margin-block-end: 12px; }
.co-info-grid h4 .co-icon { width: 18px; height: 18px; }
.co-info-grid strong, .co-info-grid p { font-size: 12px; overflow-wrap: anywhere; white-space: pre-line; }
.co-info-grid p { margin-block: 5px 0; }
.co-info-grid small { display: block; font-size: 10px; color: var(--shop-muted); margin-block-start: 7px; overflow-wrap: anywhere; }
.co-note, .co-cancelled { display: flex; align-items: start; gap: 12px; background: var(--shop-surface-2); border: 1px solid var(--shop-line); border-radius: 12px; padding: 16px; font-size: 12px; margin-block: 18px; }
.co-note p { margin: 5px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.co-note > .co-icon { color: var(--co-accent); }
.co-items { margin-block: 24px; }
.co-items ul { padding: 0; margin: 0; list-style: none; }
.co-items li { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-block: 14px; border-block-end: 1px solid var(--shop-line); font-size: 12px; }
.co-items li > div { min-width: 0; }
.co-items strong { font-weight: 600; overflow-wrap: anywhere; }
.co-items small { display: block; color: var(--shop-muted); font-size: 10px; margin-block-start: 5px; }
.co-items li > b { white-space: nowrap; font-weight: 600; }
.co-totals { max-width: 340px; margin: 18px 0 0; margin-inline-start: auto; font-size: 12px; }
.co-totals > div { display: flex; justify-content: space-between; gap: 14px; padding-block: 5px; }
.co-totals dd { margin: 0; white-space: nowrap; }
.co-totals dt { color: var(--shop-muted); }
.co-totals > div:last-child { border-block-start: 1px solid var(--shop-line); margin-block-start: 8px; padding-block-start: 12px; font-weight: 700; }
.co-totals > div:last-child dt { color: var(--shop-text); }
.co-history { border-block-start: 1px solid var(--shop-line); }
.co-history summary { min-height: 52px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; list-style: none; }
.co-history summary .co-icon:last-child { margin-inline-start: auto; }
.co-history[open] summary .co-icon:last-child { transform: rotate(180deg); }
.co-history ol { list-style: none; margin: 8px 12px 20px; padding-inline-start: 22px; border-inline-start: 1px solid var(--shop-line); font-size: 12px; }
.co-history li { position: relative; padding-block: 0 16px; }
.co-history li::before { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--co-accent); inset-inline-start: -26px; inset-block-start: 7px; }
.co-history time { display: block; color: var(--shop-muted); font-size: 10px; margin-block: 4px; }
.co-history p { font-size: 11px; white-space: pre-line; overflow-wrap: anywhere; }
.co-order-actions { border-block-start: 1px solid var(--shop-line); padding-block-start: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-order-actions > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.co-order-actions .c-primary, .co-order-actions .c-secondary { font-size: 11px; }
.co-copy-line { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; }
.co-copy-line bdi { display: block; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.co-copy { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid transparent; border-radius: 10px; color: var(--co-accent); background: transparent; }
.co-copy .co-icon { width: 18px; height: 18px; }
.co-copy:hover { background: var(--shop-primary-soft); }
.co-empty { text-align: center; border: 1px dashed var(--shop-line-strong); border-radius: 20px; padding: 44px 24px; background: var(--shop-surface); }
.co-empty > .co-icon { width: 42px; height: 42px; color: var(--co-accent); margin-block-end: 20px; }
.customer-app .co-empty h2 { font-size: 19px; }
.co-empty p { font-size: 13px; color: var(--shop-muted); }
.co-tracking .c-more { display: flex; margin: 18px auto; min-width: 240px; }
html[data-shop-mode-resolved="dark"] .co-order.is-waiting { --co-tone: #f1c675; --co-soft: #362e20; }
html[data-shop-mode-resolved="dark"] .co-order.is-shipped { --co-tone: #8dc6f1; --co-soft: #1f303e; }
html[data-shop-mode-resolved="dark"] .co-order.is-cancelled { --co-tone: #f2a0a6; --co-soft: #3a252c; }
html[data-shop-mode-resolved="dark"] .co-stat-clock { color: #f1c675; background: #362e20; }
html[data-shop-mode-resolved="dark"] .co-stat-card { color: #c5adef; background: #2c263a; }
html[data-shop-mode-resolved="dark"] .co-stat-box { color: #8dc6f1; background: #1f303e; }
@media (max-width: 980px) {
  .co-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-info-grid > section:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .co-section-title { align-items: start; flex-direction: column; gap: 6px; }
}
@media (max-width: 600px) {
  .co-stats { gap: 10px; margin-block: 20px 26px; }
  .co-stats article { gap: 9px; padding: 14px 12px; align-items: center; }
  .co-stats article > div { min-width: 0; }
  .co-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .co-stat-icon .co-icon { width: 19px; height: 19px; }
  .co-stats strong { font-size: 22px; }
  .co-stats small { font-size: 10px; }
  .co-stats article:last-child strong { font-size: 12px; }
  .customer-app .co-section-title h2 { font-size: 18px; }
  .co-section-title p { font-size: 11px; }
  .co-shop-chips button { padding: 10px 12px; min-height: 70px; font-size: 12px; max-width: 240px; }
  .co-shop-chips .co-logo { width: 40px; height: 40px; }
  .co-toolbar { gap: 10px; }
  .co-filter-fields { width: 100%; gap: 10px; }
  .co-filter { min-width: 0; flex: 1; }
  .co-filter select { font-size: 12px; max-width: none; padding-inline: 7px; }
  .co-filter-fields .c-link { flex-basis: 100%; justify-content: start; padding-inline: 0; }
  .co-toolbar p { margin: 0; }
  .co-shop-heading { padding: 15px 14px; gap: 10px; flex-wrap: wrap; }
  .co-shop-identity { gap: 10px; flex: 1 1 170px; }
  .co-shop-identity .co-logo { width: 42px; height: 42px; }
  .customer-app .co-shop-identity h2 { font-size: 15px; }
  .co-visit { padding: 0; font-size: 10px; }
  .co-order > summary { grid-template-columns: 32px minmax(0, 1fr) 22px; gap: 12px 10px; padding: 18px 14px; }
  .co-order-mark { width: 32px; height: 32px; border-radius: 10px; }
  .co-order-mark .co-icon { width: 18px; height: 18px; }
  .co-order-id { grid-column: 2; grid-row: 1; }
  .co-chevron { grid-column: 3; grid-row: 1; }
  .co-order-amount { grid-column: 2 / 4; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .co-order-amount b { font-size: 13px; }
  .co-order-amount small { font-size: 11px; margin: 0; }
  .co-status { grid-row: 3; grid-column: 2 / 4; }
  .co-detail { padding: 0 14px 18px; }
  .co-current { padding: 14px 12px; gap: 10px; }
  .co-current h4 { font-size: 14px; }
  .co-current p { font-size: 12px; }
  .co-current > span .co-icon { width: 24px; height: 24px; }
  .co-progress b { font-size: 10px; max-width: 52px; }
  .co-progress li > span { width: 28px; height: 28px; }
  .co-progress li:not(:last-child)::after { inset-block-start: 14px; inset-inline-start: calc(50% + 17px); width: calc(100% - 34px); }
  .co-info-grid { grid-template-columns: 1fr; gap: 10px; }
  .co-info-grid > section:nth-child(2) { grid-row: auto; }
  .co-info-grid > section { padding: 14px; }
  .co-items li { flex-direction: column; gap: 7px; font-size: 11px; }
  .co-items li > b { align-self: flex-end; }
  .co-order-actions > div:last-child { width: 100%; }
  .co-order-actions .c-primary, .co-order-actions .c-secondary { flex: 1 1 200px; }
}
