/* The order history above remains independent of unfinished service requests. */
#view-orders .order-collections{width:100%;max-width:var(--account-content-width);margin:38px auto 0;box-sizing:border-box;display:grid;gap:30px;color:var(--text-main,#243447);}
#view-orders .order-collection{min-width:0;}
#view-orders .order-collection-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px;}
#view-orders .order-collection-heading h2{margin:0;font-size:clamp(23px,2vw,29px);font-weight:800;line-height:1.6;}
#view-orders .order-collection-heading p{margin:5px 0 0;color:#687586;font-size:14px;line-height:1.9;}
#view-orders .order-collection-count{flex:none;min-width:32px;height:32px;box-sizing:border-box;display:grid;place-items:center;padding-inline:8px;margin-top:6px;border:1px solid #d8dfe5;border-radius:10px;color:#657587;background:#f1f4f6;font-size:13px;font-weight:700;}
#view-orders .order-collection-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:205px;box-sizing:border-box;padding:30px 22px;text-align:center;border:1px solid #d3d9df;border-radius:20px;background:#f6f7f7;}
#view-orders .order-collection-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#e8eced;color:#7b8795;margin-bottom:14px;}
#view-orders .order-collection-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
#view-orders .order-collection-empty h3{margin:0;font-size:17px;font-weight:800;}
#view-orders .order-collection-empty p{margin:8px 0 0;color:#778392;font-size:13px;line-height:1.9;}
#view-orders .order-collection-list{display:grid;gap:12px;}
#view-orders .service-draft-card{display:flex;align-items:center;justify-content:space-between;gap:20px;border:1px solid #d3d9df;border-radius:18px;padding:20px 22px;background:#fff;}
#view-orders .service-draft-copy{min-width:0;flex:1;}
#view-orders .service-draft-copy h3{font-size:16px;line-height:1.7;margin:0;font-weight:800;}
#view-orders .service-draft-copy p{font-size:13px;line-height:1.8;margin:5px 0 0;color:#687586;white-space:pre-wrap;overflow-wrap:anywhere;}
#view-orders .service-draft-status{display:block;color:#8a751a;font-size:11px;line-height:1.8;margin-top:7px;}
#view-orders .service-draft-actions{display:flex;align-items:center;gap:8px;flex:none;}
#view-orders .service-draft-actions button{font:inherit;min-height:44px;cursor:pointer;border-radius:11px;border:1px solid #d3d9df;padding:9px 15px;background:transparent;color:inherit;font-size:13px;font-weight:700;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
#view-orders .service-draft-actions .service-draft-resume{border-color:#ffcc00;background:#ffcc00;color:#243447;}
#view-orders .service-draft-actions .service-draft-remove{width:44px;padding:10px;color:#a95852;display:grid;place-items:center;}
#view-orders .service-draft-remove svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}
#view-orders .service-draft-actions button:focus-visible{outline:3px solid #978338;outline-offset:2px;}
#view-orders .order-collection-note,#view-orders .order-collection-feedback{font-size:12px;line-height:1.9;margin:10px 0 0;color:#778392;}
#view-orders .order-collection-feedback:empty{display:none;}
#view-orders .order-collection-feedback button{font:inherit;color:inherit;background:transparent;border:0;text-decoration:underline;cursor:pointer;padding:5px;}
#view-orders .order-collection [hidden]{display:none!important;}
html[data-account-theme=dark] #view-orders :is(.order-collection-heading p,.order-collection-empty p,.service-draft-copy p,.order-collection-note,.order-collection-feedback){color:var(--text-muted,#a4b0bf);}
html[data-account-theme=dark] #view-orders :is(.order-collection-empty,.service-draft-card,.order-collection-count){border-color:#485362;background:#252e39;}
html[data-account-theme=dark] #view-orders .order-collection-icon{background:#303d4c;color:#b3bfcd;}
html[data-account-theme=dark] #view-orders .service-draft-status{color:#dfc666;}
/* Orders and their empty states use a complete dark palette, including details
   and badges; the broader account heading rule must not whiten all body copy. */
@media screen{
  html[data-account-theme=dark] .app-layout #view-orders :is(.orders-state,.order-collection-empty,.order-card){background:#222831!important;border-color:#363f4b!important;box-shadow:none;}
  html[data-account-theme=dark] .app-layout #view-orders :is(.orders-state-icon,.order-collection-icon){background:#303947;color:#b6c4d4;}
  html[data-account-theme=dark] .app-layout #view-orders :is(.orders-state p,.order-collection-heading p,.order-collection-empty p,.service-draft-copy p,.order-collection-note,.order-collection-feedback){color:#a5b1c1!important;}
  html[data-account-theme=dark] .app-layout #view-orders :is(.order-collection-count,.order-tab-count){background:#303947;border-color:#424d5c;color:#c3cddb;}
  html[data-account-theme=dark] .app-layout #view-orders .tab-btn:not(.active){color:#b6c4d4!important;}
  html[data-account-theme=dark] .app-layout #view-orders .tab-btn.active .order-tab-count{background:#ffffff66;color:#685a21;}
  html[data-account-theme=dark] .app-layout #view-orders :is(.order-id,.order-footer,.progress-text,.order-price small){color:#a5b1c1;}
  html[data-account-theme=dark] .app-layout #view-orders .order-footer{border-color:#363f4b;}
  html[data-account-theme=dark] .app-layout #view-orders .progress-track{background:#3b4552;}
  html[data-account-theme=dark] .app-layout #view-orders .status-active{background:#3d3728;color:#ffe08a;}
  html[data-account-theme=dark] .app-layout #view-orders .status-done{background:#193d2b;color:#98e0b2;}
  html[data-account-theme=dark] .app-layout #view-orders .status-cancelled{background:#432936;color:#ff8996;}
  html[data-account-theme=dark] .app-layout #view-orders .orders-retry{background:#303947;border-color:#516379;color:#e4eaf1;}
}
@media(max-width:650px){
  #view-orders .order-collections{margin-top:30px;gap:26px;}
  #view-orders .order-collection-heading{gap:12px;margin-bottom:14px;}
  #view-orders .order-collection-heading p{font-size:12px;}
  #view-orders .order-collection-empty{min-height:190px;padding:26px 18px;}
  #view-orders .service-draft-card{align-items:stretch;flex-direction:column;gap:14px;padding:18px;}
  #view-orders .service-draft-actions{justify-content:flex-end;}
  #view-orders .service-draft-resume{flex:1;}
}
