/* Keep administrative pages within the viewport without concealing content. */
.has-admin main,.has-admin .panel,.has-admin fieldset,.has-admin .actions,.has-admin .filters,.has-admin .form-grid>*{min-width:0;max-width:100%}
.has-admin .table-scroll,.has-admin .price-scroll,.has-admin .catalog-list-scroll{max-width:100%;min-width:0}
.has-admin .table-scroll table{width:100%;min-width:0!important;table-layout:fixed}
.has-admin .table-scroll th,.has-admin .table-scroll td{min-width:0!important;white-space:normal;overflow-wrap:anywhere}
.has-admin .table-scroll button,.has-admin .table-scroll a,.has-admin .table-scroll pre{max-width:100%;white-space:normal!important;overflow-wrap:anywhere}
.has-admin input:not([type=checkbox]),.has-admin select,.has-admin textarea{min-width:0;max-width:100%}
.has-admin .account-row-actions{white-space:normal}
.has-admin .actions,.has-admin .accounts-toolbar{flex-wrap:wrap}
.column-sort{display:inline-flex;align-items:center;gap:5px;width:100%;padding:0;border:0;background:transparent;color:inherit;text-align:left;font-size:inherit;line-height:1.5;box-shadow:none;font-weight:600}
.column-sort:after{content:'↕';color:#8b9db4;font-size:11px}
th[aria-sort=ascending] .column-sort:after{content:'↑';color:#2676ce}th[aria-sort=descending] .column-sort:after{content:'↓';color:#2676ce}
.column-sort:focus-visible{outline:2px solid #3689e7;outline-offset:3px}
#game-admin #game-table{width:100%;min-width:0;table-layout:fixed}
#game-admin #game-table th{width:auto;padding:9px 5px;white-space:normal;overflow-wrap:anywhere}
#game-admin #game-table th[data-field=name]{width:17%}
#game-admin #game-table th[data-field=jan]{width:10%}
#game-admin #game-table th[data-field=last_updated]{width:11%}
#game-admin #game-table td{padding:8px 5px;overflow-wrap:anywhere}
#game-admin #game-table input{min-width:0;width:100%;padding:6px 3px}
#game-admin #game-table td button{white-space:normal;max-width:100%;padding:5px}
#game-admin #game-search .filters label{max-width:100%;min-width:0}
#game-admin #game-search select{min-width:0;max-width:100%}
#game-admin #game-search .search-line{flex-wrap:wrap}
#card-list .compact-products th{padding:9px 10px;white-space:normal;position:sticky;top:0;z-index:2;background:#edf3fa}
#card-list .compact-products th:first-child{width:55px}
#price-grid .product-column,#price-grid td.delivery-cell,#price-grid td:nth-last-child(3),#price-grid td:nth-last-child(2),#price-grid td:last-child{min-width:0;width:auto;max-width:none;white-space:normal}
#price-grid .price-product,#price-grid .price-product>div{min-width:0;max-width:100%}
#price-grid thead button{cursor:pointer}
#price-grid th[aria-sort=none] button:after{content:' ↕';opacity:.5}
#price-grid .price-input{max-width:100%}
@media(max-width:1250px){
 #game-admin #game-table,#price-grid{display:block;table-layout:auto;width:100%;min-width:0}
 #game-table colgroup,#price-grid colgroup{display:none}
 #game-admin #game-table thead,#price-grid thead{display:block;position:static}
 #game-admin #game-table thead tr,#price-grid thead tr{display:flex;flex-wrap:wrap;gap:7px;padding:10px;background:#f4f7fb}
 #game-admin #game-table thead th,#price-grid thead th{display:block;position:static!important;top:auto!important;width:auto!important;height:auto!important;padding:6px 9px!important;border:1px solid #dae4f0;border-radius:6px;background:white}
 #price-grid thead th.price-group-heading,#price-grid th[data-sort=clear],#price-grid th[data-sort=history]{display:none}
 #price-grid #price-subhead button{font-size:0}
 #price-grid #price-subhead button:before{content:attr(aria-label);font-size:11px}
 #price-grid #price-subhead button:after{font-size:11px}
 #game-admin #game-table tbody,#price-grid tbody{display:block}
 #game-admin #game-table tbody tr,#price-grid tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;border-bottom:7px solid #edf2f7;padding:10px;background:#fff}
 #game-admin #game-table tbody td,#price-grid tbody td{display:block;min-width:0!important;width:auto;max-width:none;padding:10px!important;white-space:normal;position:static;border-bottom:0}
 #game-table tbody td:before,#price-grid tbody td:before{content:attr(data-label);display:block;margin-bottom:7px;color:#60768d;font-size:11px;font-weight:600}
 #game-admin #game-table td[data-field=name],#price-grid td.product-column{grid-column:span 2}
 #price-grid .price-input{max-width:none;height:36px}
 #price-grid .price-product img{max-width:44px;height:52px;margin:0}
 #game-admin .table-scroll,.price-scroll{max-height:70dvh}
 .has-admin .accounts-panel table{table-layout:auto}
}
@media(max-width:600px){
 #game-admin #game-table tbody tr,#price-grid tbody tr{grid-template-columns:repeat(2,minmax(0,1fr));padding:4px}
 #game-admin #game-table td[data-field=name],#price-grid td.product-column{grid-column:1/-1}
 .has-admin .table-scroll th,.has-admin .table-scroll td{padding:8px 4px;font-size:11px}
 .has-admin .accounts-panel table{table-layout:fixed}
 .has-admin .accounts-panel input,.has-admin .accounts-panel select{padding:4px;font-size:11px}
 .has-admin .account-status{white-space:normal;padding:4px}
 .price-filter-group{flex-wrap:wrap;min-width:0;max-width:100%}
 .price-command-bar>*{max-width:100%}
 .has-admin .form-grid,.has-admin .filters{grid-template-columns:minmax(0,1fr)}
 .has-admin .catalog-filter-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .has-admin .data-operation-grid,.has-admin .csv-download-grid{grid-template-columns:minmax(0,1fr)}
 .has-admin .data-operation-card,.has-admin .csv-upload-fields .csv-file-field{min-width:0}
 .has-admin .table-scroll pre{min-width:0!important}
 .has-admin .list-pagination{flex-wrap:wrap}
}
/* Imported master data is read-only; keep editable adjustments compact. */
#game-admin #game-table td{padding:5px 4px;vertical-align:top}
#game-admin #game-table .game-master-value{display:block;font-size:11px;line-height:1.5;padding:5px 0;overflow-wrap:anywhere}
#game-admin #game-table .game-master-hint{display:block;font-size:9px;line-height:1.3;margin:3px 0 0;white-space:nowrap;overflow-wrap:normal;letter-spacing:-.02em}
#game-admin #game-table input{height:30px;min-height:30px;font-size:12px}
#game-admin #game-table .game-row-actions span{font-size:10px;line-height:1.3}
#game-admin #game-table .game-row-actions button{font-size:10px;line-height:1.2;min-height:0;padding:4px;margin-top:4px}
#game-admin[data-screen=prices] #game-table th[data-field=name]{width:16%}
#game-admin[data-screen=prices] #game-table th[data-field=jan]{width:9%}
#game-admin[data-screen=prices] #game-table th[data-field=model_number],#game-admin[data-screen=prices] #game-table th[data-field=category]{width:7%}
#game-admin[data-screen=prices] #game-table th[data-field=adjust_sale_price],#game-admin[data-screen=prices] #game-table th[data-field=adjust_buy_price]{width:9%}
#game-admin[data-screen=prices] #game-table th[data-field=last_updated]{width:10%}
@media(min-width:1251px){#game-admin #game-table td[data-field=name] .game-master-value{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}}

/* Keep price-table labels intact, including their sort indicators. */
#game-admin #game-table thead th,
#game-admin #game-table thead .column-sort,
#price-grid thead th,
#price-grid thead th button,
#price-grid tbody td:nth-child(4),
#price-grid tbody td:nth-child(5),
#price-grid tbody td:nth-child(6),
#game-admin #game-table td[data-field=release_date],
#game-admin #game-table .game-row-actions span,
#game-admin #game-table .game-row-actions button,
#price-grid tbody td:nth-last-child(2),
#price-grid tbody .minor{
 white-space:nowrap!important;
 overflow-wrap:normal;
 word-break:normal;
}
@media(min-width:1251px){
 #game-admin #game-table,#price-grid{table-layout:auto}
 #price-grid col{width:auto}
 #price-grid tbody td:nth-child(3){width:17%}
}
@media(min-width:1251px){
 #price-grid .price-input{min-width:72px}
}

/* Reserve compact metadata columns and give the remaining width to the title. */
@media(min-width:1251px){
 #price-grid{table-layout:fixed;min-width:1280px}
 #price-grid col:nth-child(1){width:68px}
 #price-grid col:nth-child(2){width:60px}
 #price-grid col:nth-child(3){width:auto}
 #price-grid col:nth-child(4){width:50px}
 #price-grid col:nth-child(5){width:82px}
 #price-grid col:nth-child(6){width:88px}
 #price-grid col{width:82px}
 #price-grid col:nth-child(11){width:94px}
 #price-grid col:nth-child(13){width:76px}
 #price-grid col:nth-child(14){width:48px}
 #price-grid col:nth-child(15){width:88px}
 #price-grid tbody td:nth-child(3){width:auto}
}
