/* CY V12.2 layout and operator clarity */
.inventory-table{min-width:1450px}
.inventory-table .c-name{width:138px}
.inventory-table .c-attrs{width:292px}
.inventory-table .c-age{width:52px}
.inventory-table .c-status{width:220px}
.inventory-table td:nth-child(7){white-space:nowrap}
.inventory-table .cy-v122-ops{display:inline-flex;gap:5px;align-items:center;flex-wrap:nowrap}
.cy-v122-pencil{display:inline-flex;background:none;border:0;color:#7158b7;cursor:pointer;padding:2px 3px;font-size:15px;vertical-align:middle}
.cy-v122-pencil:hover{background:#f1edff;border-radius:4px}
.inventory-table .equipment-name,.inventory-table .faction-text,.pending-table .faction-text{display:inline-block;max-width:calc(100% - 23px);vertical-align:middle}
.cy-v122-badge{display:inline-flex;align-items:center;border-radius:6px;padding:4px 7px;font-weight:800;font-size:11px;white-space:nowrap}
.cy-v122-available{background:#e2f5eb;color:#147a43}
.cy-v122-unavailable,.cy-v122-error{background:#ffeded;color:#be2531}
.cy-v122-shipping{background:#fff0db;color:#9d4c06}
.cy-v122-sold{background:#ede9fb;color:#5f43b8}
.cy-v122-sold-fengshi{background:#dcfce7;color:#166534}
.cy-v122-sold-g2g{background:#dbeafe;color:#1d4ed8}
.cy-v122-review{background:#fff1d5;color:#a45c0e}
.cy-v122-unknown,.cy-v122-neutral{background:#eff1f6;color:#526276}
.cy-v122-order-time{display:inline-block;margin-left:5px;font-size:10px;color:#876348}
.cy-v122-manage-btn{border:1px solid #e1d9f8;background:#f6f3ff;color:#6547b1;border-radius:5px;cursor:pointer;font-size:10px;padding:5px}
.cy-v122-name-tool{border:0;background:none;color:#6455af;cursor:pointer;text-align:left;font-size:11px;margin-top:3px}
.cy-v122-modal{position:fixed;inset:0;background:#0008;display:flex;align-items:center;justify-content:center;z-index:3000;padding:10px}
.cy-v122-modal.hidden{display:none}
.cy-v122-dialog{background:white;border-radius:12px;padding:16px;width:min(520px,95vw);box-shadow:0 20px 50px #0003;max-height:95vh;overflow:auto}
.cy-v122-modal-head{display:flex;justify-content:space-between;align-items:center}
.cy-v122-modal-head h3{font-size:16px;margin:0 0 14px}
.cy-v122-modal-head button{border:0;background:#f3f4f7;font-size:20px;border-radius:6px;cursor:pointer}
.cy-v122-dialog input,.cy-v122-dialog select,.cy-v122-dialog textarea{display:block;width:100%;box-sizing:border-box;border:1px solid #d9dfeb;border-radius:7px;padding:9px;font:inherit;margin:6px 0 11px}
.cy-v122-label{display:block;font-weight:750;font-size:12px;color:#465067}
.cy-v122-help{color:#667083;font-size:12px;line-height:1.6}
.cy-v122-modal-actions{display:flex;justify-content:flex-end;gap:8px}
.cy-v122-root{font-size:15px;font-weight:800;margin:8px 0}
.cy-v122-history{max-height:300px;overflow:auto}
.cy-v122-history>div{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee;padding:6px}
.cy-v122-delete{color:#ae2e38;border:1px solid #f3c5c8;background:#fff5f5;border-radius:5px;padding:4px 8px;cursor:pointer}

/* V12.2 RC2 - readable desk layout */
#inventory .inventory-career-v9{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px}
#inventory .inventory-career-v9 .career-tags{display:flex;flex:1;flex-wrap:wrap;justify-content:flex-start;gap:6px}
#inventory .cy-rc2-summary{font-size:14px;font-weight:750;color:#283347;white-space:nowrap;margin-left:auto;letter-spacing:.1px}
#inventory .inventory-table{min-width:1645px;table-layout:fixed}
#inventory .inventory-table .c-check{width:35px}
#inventory .inventory-table .c-code{width:88px}
#inventory .inventory-table .c-storage{width:142px}
#inventory .inventory-table .c-name{width:138px}
#inventory .inventory-table .c-attrs{width:235px}
#inventory .inventory-table .c-cost{width:82px}
#inventory .inventory-table .c-price{width:80px}
#inventory .inventory-table .c-status{width:215px}
#inventory .inventory-table .c-faction{width:120px}
#inventory .inventory-table .c-career{width:65px}
#inventory .inventory-table .c-buyer{width:79px}
#inventory .inventory-table .c-slot{width:77px}
#inventory .inventory-table .c-age{width:62px}
#inventory .inventory-table .c-note{width:120px}
#inventory .inventory-table th{font-size:13px;font-weight:750}
#inventory .inventory-table td{font-size:14px;line-height:1.5;height:44px;overflow:hidden;text-overflow:ellipsis}
#inventory .inventory-table .cy-v122-badge{font-size:12px}
#inventory .cy-rc2-actions{display:grid;grid-template-columns:137px 58px;gap:5px;align-items:center}
#inventory .cy-rc2-status{min-width:0;white-space:nowrap;overflow:hidden}
#inventory .cy-rc2-operation{width:58px}
#inventory .cy-rc2-operation button{width:100%;height:30px;font-size:12px}
.cy-rc2-editable{cursor:pointer;border-radius:4px;padding:3px 2px}
.cy-rc2-editable:hover{background:#f0ecff;text-decoration:underline}
.cy-rc2-stale{font-size:10px;color:#976a28;padding-left:3px}
#inventory .table-wrap{overflow-x:auto}
@media(max-width:1500px){#inventory .cy-rc2-summary{margin-left:0}}

/* RC3: protect storage account column and full sale timestamp on desktop */
#inventory .inventory-table{min-width:1715px}
#inventory .inventory-table .c-storage{width:150px}
#inventory .inventory-table .c-age{width:112px}
#inventory .inventory-table td:nth-child(13){white-space:nowrap;font-variant-numeric:tabular-nums}
#dashboard .bestseller-table{min-width:590px}
#dashboard .bestseller-table td{font-size:13px;vertical-align:middle}

/* RC4: consistent, readable career buttons, with wrapping on narrower screens */
#inventory .inventory-career-v9 .career-tags {display:grid;grid-template-columns:repeat(11,minmax(88px,1fr));gap:9px;align-items:center;flex:1 1 1020px;min-width:0}
#inventory .inventory-career-v9 .career-tags .career-tag{width:100%;min-width:0;height:40px;padding:0 8px;font-size:13px;white-space:nowrap}
#purchase .career-tags,#purchaseForm .career-tags{grid-template-columns:repeat(9,minmax(0,1fr));gap:8px}
@media(max-width:1480px){#inventory .inventory-career-v9 .career-tags{grid-template-columns:repeat(6,minmax(88px,1fr))}}
@media(max-width:850px){#inventory .inventory-career-v9 .career-tags{grid-template-columns:repeat(3,minmax(88px,1fr))}#purchase .career-tags,#purchaseForm .career-tags{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* RC5 employee-scoped name options */
#purchase .cy-rc5-host{position:relative}
#purchase .cy-rc5-menu{position:absolute;top:calc(100% - 2px);left:0;right:0;max-height:270px;overflow-y:auto;z-index:120;background:#fff;border:1px solid #d8dce9;border-radius:8px;box-shadow:0 10px 25px #0002}
#purchase .cy-rc5-menu[hidden]{display:none}
#purchase .cy-rc5-option{display:flex;align-items:center;border-bottom:1px solid #eee;min-height:35px}
#purchase .cy-rc5-pick{flex:1;border:0;background:transparent;text-align:left;cursor:pointer;padding:8px 10px;min-width:0;font-size:13px;color:#25324b}
#purchase .cy-rc5-pick:hover{background:#f5f2ff}
#purchase .cy-rc5-x{border:0;background:none;color:#a74252;cursor:pointer;font-size:19px;width:34px;height:34px;flex:none}
#purchase .cy-rc5-x:hover{background:#fff0f0}
#purchase .cy-rc5-empty{font-size:12px;color:#728098;padding:10px}

/* RC6 sortable inventory headers */
#inventory .inventory-table th[data-sort-key]{cursor:pointer;user-select:none;}
#inventory .inventory-table th[data-sort-key]:hover{background:#eeebff;color:#5140bb;}
#inventory .inventory-table th[aria-sort="ascending"],#inventory .inventory-table th[aria-sort="descending"]{color:#5d48c8;background:#f1efff;}
#inventory .cy-sort-icon{display:inline-block;margin-left:3px;font-weight:700;}

/* RC7.5: pending intake grid visual parity with inventory; presentation only. */
#pending .panel {overflow:hidden;}
#pending .cy-v11-search-head {padding:12px 14px;min-height:62px;border-bottom:1px solid #e5e8f0;}
#pending .cy-v11-search-head .pending-tools {gap:10px;align-items:center;}
#pending .cy-v11-search-head .searchbox {height:39px;border-radius:8px;padding:0 12px;gap:9px;}
#pending .cy-v11-search-head .searchbox input {font-size:14px;line-height:1.5;}
#pending .cy-v11-search-head .searchbox b {font-size:12px;font-weight:700;color:#657084;font-variant-numeric:tabular-nums;}
#pending .cy-v11-search-head .bulk-storage {gap:8px;}
#pending .cy-v11-search-head .bulk-storage input {height:39px;width:125px;padding:0 11px;font-size:13px;border-radius:8px;}
#pending .cy-v11-search-head .btn {min-height:39px;padding:0 13px;font-size:13px;font-weight:700;white-space:nowrap;border-radius:8px;}
#pending .table-wrap {overflow-x:auto;}
#pending .pending-table {min-width:1510px;table-layout:fixed;}
#pending .pending-table .c-check {width:38px;}
#pending .pending-table .c-code {width:86px;}
#pending .pending-table .c-storage {width:132px;}
#pending .pending-table .c-name {width:148px;}
#pending .pending-table .c-attrs {width:320px;}
#pending .pending-table .c-faction {width:126px;}
#pending .pending-table .c-career {width:76px;}
#pending .pending-table .c-buyer {width:80px;}
#pending .pending-table .c-slot {width:76px;}
#pending .pending-table .c-cost {width:84px;}
#pending .pending-table .c-price {width:76px;}
#pending .pending-table .c-status {width:86px;}
#pending .pending-table .c-action {width:135px;}
#pending .pending-table th {height:40px;padding:10px 9px;font-size:13px;font-weight:750;color:#4b566a;}
#pending .pending-table td {height:45px;padding:7px 9px;font-size:14px;line-height:1.5;color:#253247;}
#pending .pending-table td:nth-child(2) {font-weight:750;font-variant-numeric:tabular-nums;}
#pending .pending-table .equipment-name {font-size:14px;}
#pending .pending-table .attr-display,#pending .pending-table .faction-text {font-size:14px;}
#pending .pending-table .status {font-size:12px;padding:4px 8px;}
#pending .pending-table .status-actions {display:flex;align-items:center;gap:7px;flex-wrap:nowrap;}
#pending .pending-table .status-actions .mini {min-width:51px;min-height:30px;padding:5px 9px;border-radius:6px;font-size:12px;font-weight:700;}
#pending .pending-table td:nth-last-child(2),#pending .pending-table td:nth-last-child(3) {font-variant-numeric:tabular-nums;}
@media(max-width:1180px) {
  #pending .cy-v11-search-head .pending-tools {flex-wrap:wrap;}
  #pending .cy-v11-search-head .searchbox {flex-basis:100%;}
}
@media(max-width:700px) {
  #pending .cy-v11-search-head {padding:10px;}
  #pending .cy-v11-search-head .bulk-storage {flex-wrap:wrap;}
  #pending .cy-v11-search-head .bulk-storage input {flex:1;min-width:120px;}
}

/* RC7.9 inventory and sold archive parity */
#inventory .cy-rc79-time-row,#sold .cy-rc79-time-row{padding-bottom:5px;align-items:center}
#inventory .cy-rc79-search-row .searchbox,#sold .cy-rc79-search-row .searchbox{flex:1 1 460px;min-width:300px}
#inventory .cy-rc79-search-row .searchbox input,#sold .cy-rc79-search-row .searchbox input{font-size:14px}
#sold .cy-rc79-sold-table{min-width:1650px;table-layout:fixed}
#sold .cy-rc79-sold-table .sold-code{width:88px}
#sold .cy-rc79-sold-table .sold-name{width:165px}
#sold .cy-rc79-sold-table .sold-attrs{width:440px}
#sold .cy-rc79-sold-table .sold-career{width:76px}
#sold .cy-rc79-sold-table .sold-faction{width:130px}
#sold .cy-rc79-sold-table .sold-storage{width:150px}
#sold .cy-rc79-sold-table .sold-buyer{width:86px}
#sold .cy-rc79-sold-table .sold-cost{width:85px}
#sold .cy-rc79-sold-table .sold-price{width:85px}
#sold .cy-rc79-sold-table .sold-platform{width:100px}
#sold .cy-rc79-sold-table .sold-time{width:164px}
#sold .cy-rc79-sold-table th{font-size:13px;font-weight:750;white-space:nowrap}
#sold .cy-rc79-sold-table td{font-size:14px;line-height:1.5;height:44px;padding:8px;vertical-align:middle}
#sold .cy-rc79-sold-table th[data-sort-key]{cursor:pointer;user-select:none}
#sold .cy-rc79-sold-table th[data-sort-key]:hover,#sold .cy-rc79-sold-table th[aria-sort="ascending"],#sold .cy-rc79-sold-table th[aria-sort="descending"]{background:#f1efff;color:#5d48c8}
#sold .sold-attrs-cell .attr-display{max-width:420px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#sold .cy-rc79-sold-careers{display:flex;gap:10px;align-items:center;padding:10px 12px;flex-wrap:wrap}
#sold .cy-rc79-sold-careers .career-tags{display:grid;grid-template-columns:repeat(10,minmax(88px,1fr));gap:9px;flex:1}
#sold .cy-rc79-sold-careers .career-tag{width:100%;min-width:0;height:40px;font-size:13px}
#sold .cy-rc79-hidden{display:none}
@media(max-width:1480px){#sold .cy-rc79-sold-careers .career-tags{grid-template-columns:repeat(5,minmax(88px,1fr))}}
@media(max-width:850px){#sold .cy-rc79-sold-careers .career-tags{grid-template-columns:repeat(3,minmax(88px,1fr))}}

/* RC7.9.1 series buttons - both inventory and sold */
#inventory .cy-series-quick,#sold .cy-series-quick{display:flex;align-items:center;gap:8px;flex:0 0 auto}
#inventory .cy-series-hidden,#sold .cy-series-hidden{display:none}
#inventory .cy-series-btn,#sold .cy-series-btn{height:37px;padding:0 15px;border:1px solid #e1e3eb;border-radius:8px;background:#fff;color:#303948;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
#inventory .cy-series-btn:hover,#sold .cy-series-btn:hover{border-color:#7761db}
#inventory .cy-series-btn.active,#sold .cy-series-btn.active{background:#6550d9;color:#fff;border-color:#6550d9}
@media(max-width:920px){#inventory .cy-rc79-search-row,#sold .cy-rc79-search-row{flex-wrap:wrap}}

/* RC7.9.3: Place both series quick filters on date row, with matching wide buttons. */
#inventory .cy-rc79-time-row,#sold .cy-rc79-time-row{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#inventory .cy-rc79-time-row .cy-series-quick,#sold .cy-rc79-time-row .cy-series-quick{display:flex;align-items:center;gap:12px;margin-left:auto;flex:0 0 auto}
#inventory .cy-rc79-time-row .cy-series-btn,#sold .cy-rc79-time-row .cy-series-btn{width:176px;min-width:176px;height:40px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;font-size:14px}
@media(max-width:860px){#inventory .cy-rc79-time-row .cy-series-quick,#sold .cy-rc79-time-row .cy-series-quick{margin-left:0;flex-wrap:wrap}#inventory .cy-rc79-time-row .cy-series-btn,#sold .cy-rc79-time-row .cy-series-btn{width:160px;min-width:160px}}

/* RC7.9.4: Three distinct zones on the second row, desktop and narrow screens. */
#inventory .cy-rc79-time-row,#sold .cy-rc79-time-row{
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;gap:14px;
}
#inventory .cy-rc79-time-row .cy-date-range,#sold .cy-rc79-time-row .cy-date-range{
  grid-column:1;justify-self:start;min-width:0;
}
#inventory .cy-rc79-time-row .cy-series-quick,#sold .cy-rc79-time-row .cy-series-quick{
  grid-column:2;justify-self:center;margin-left:0;display:flex;flex-wrap:nowrap;gap:12px;
}
#inventory .cy-rc79-time-row .cy-series-btn,#sold .cy-rc79-time-row .cy-series-btn{
  width:176px;min-width:176px;height:40px;
}
#inventory .cy-rc794-bulk-actions{
  grid-column:3;justify-self:end;display:flex;align-items:center;gap:8px;
  margin:0;white-space:nowrap;
}
#inventory .cy-rc794-bulk-actions #cyRc74Btn{margin-right:0!important}
@media(max-width:1400px){
  #inventory .cy-rc79-time-row,#sold .cy-rc79-time-row{grid-template-columns:auto 1fr;gap:12px}
  #inventory .cy-rc79-time-row .cy-series-quick,#sold .cy-rc79-time-row .cy-series-quick{grid-column:2;justify-self:end}
  #inventory .cy-rc794-bulk-actions{grid-column:1/-1;justify-self:end}
}
@media(max-width:900px){
  #inventory .cy-rc79-time-row,#sold .cy-rc79-time-row{display:flex;flex-wrap:wrap;justify-content:flex-start}
  #inventory .cy-rc79-time-row .cy-series-quick,#sold .cy-rc79-time-row .cy-series-quick{margin-left:0;flex-wrap:wrap;justify-self:auto}
  #inventory .cy-rc794-bulk-actions{margin-left:auto}
}
