/* Readable order workspace and fee configuration. */
.completed-summary{padding:0 20px 20px;border-bottom:1px solid var(--line)}
.completed-summary-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 14px}
.completed-summary-heading h2{margin:0;font-size:1.0625rem}
.completed-summary-heading>span{font-size:.875rem;color:var(--muted)}
.completed-metrics.metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:0}
.completed-metrics .metric-card{min-width:0}
.completed-metrics .metric-sub{line-height:1.6;white-space:normal}
.completed-metrics .metric-value{overflow-wrap:anywhere}
@container(max-width:680px){.completed-summary{padding:0 14px 16px}.completed-metrics.metrics{grid-template-columns:1fr}}
.category-proof{display:block;color:#9b8cab;font-size:0.8125rem;line-height:1.8}
.commission-source{display:block;color:#8a7c9d;font-size:0.8125rem;white-space:nowrap}
.commission-edit{display:block;margin-left:auto;font-size:0.875rem!important;padding:5px 0!important}
.commission-context,.commission-detail{background:#faf8ff;border:1px solid #ece5f8;border-radius:8px;padding:16px;margin-bottom:20px;font-size:1rem;line-height:1.8}
.commission-context p,.commission-detail p{color:#877b94;font-size:0.9375rem;margin:6px 0}
.commission-detail .commission-edit{margin:0}
.fee-default{color:#ab7c31}
.expense-form{min-width:154px;text-align:left}
.expense-form .expense-restore{font-size:0.8125rem;margin-top:2px;padding:0}
.manual-fee-note{color:#7152ba!important}
.order-expense-editors{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:22px}
.order-expense-editors>section{border:1px solid #e9e3f4;border-radius:8px;padding:18px;background:#fcfbff}
.order-expense-editors h3{font-size:1rem;margin:0 0 13px;font-weight:600}
@media(max-width:680px){.order-expense-editors{grid-template-columns:1fr}.order-expense-editors .expense-form{max-width:230px}}
.purchase-cell{min-width:170px}
.purchase-form{display:flex;gap:6px;flex-wrap:wrap;align-items:center;max-width:180px;text-align:left}
.purchase-form label{flex:1;min-width:94px}
.purchase-input-wrap{display:flex;align-items:center;border:1px solid #e3dced;border-radius:6px;padding:7px 8px;background:white;gap:5px;color:#8d819c}
.purchase-input-wrap:focus-within{border-color:#8c6bdd;box-shadow:0 0 0 2px #7959df12}
.purchase-input-wrap input{min-width:0;width:90px;border:0;background:transparent;font-size:0.9375rem;color:#283049;outline:none}
.purchase-form .button{padding:8px;font-size:0.875rem}
.purchase-form small{width:100%;font-size:0.8125rem;color:#9c8eac}
.purchase-editor{display:flex;justify-content:space-between;align-items:center;gap:20px;background:#faf8ff;border:1px solid #ece5f8;border-radius:8px;padding:18px;margin-bottom:20px}
.purchase-editor b{font-size:1.0625rem}
.purchase-editor p{font-size:0.9375rem;line-height:1.8;color:#91849d;margin:8px 0 0}
.purchase-editor .purchase-form{min-width:180px}
.overview-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.gmv-legend{display:flex;gap:20px;flex-wrap:wrap}
.gmv-legend .transaction-dot{background:#319a88}
.order-modal .detail-summary{grid-template-columns:repeat(6,minmax(0,1fr))}
@media(max-width:1000px){.overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.order-modal .detail-summary{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.purchase-editor{flex-direction:column;align-items:flex-start}.order-modal .detail-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.order-modal .detail-summary>div:last-child{grid-column:auto}.gmv-legend{gap:12px}}
.orders-table{min-width:1480px;font-size:1rem}
.orders-table th{font-size:0.875rem;padding:17px 16px;white-space:nowrap}
.orders-table td{padding:22px 16px;vertical-align:middle;line-height:1.7}
.orders-table th:nth-child(2){min-width:300px}
.orders-table .order-link{font-size:1.0625rem;font-weight:650}
.orders-table .order-source{font-size:0.875rem;line-height:1.8;margin-top:5px}
.orders-table .badge{font-size:0.8125rem;margin-top:7px}
.table-product{gap:13px}
.product-thumb.order-photo{display:flex;position:relative;align-items:center;justify-content:center;width:68px;height:84px;min-width:68px;border:1px solid #ece8f4;border-radius:8px;overflow:hidden;background:#f7f5fb}
.order-photo img{width:100%;height:100%;object-fit:contain;background:white}
.photo-fallback{font-size:0.8125rem;color:#9b90b2;line-height:1.6;text-align:center;padding:5px}
.orders-table .product-info{max-width:230px;white-space:normal}
.product-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#283049;font-size:1rem;font-weight:600;line-height:1.7;max-width:230px}
.product-title:hover{color:var(--purple);text-decoration:underline}
.orders-table .product-info small{font-size:0.8125rem;display:block;margin-top:4px;color:#9397a8;overflow-wrap:anywhere}
.orders-table .row-action{font-size:0.9375rem;white-space:nowrap;padding:9px 0}
.profit-negative{color:#c65f64}
.fee-warning{color:#b38850!important}
.order-management .orders-tabs button{font-size:0.9375rem;padding-top:18px;padding-bottom:18px}
.order-management .search-box{width:310px}
.order-management .search-box input,.order-management .toolbar-filters select{font-size:0.9375rem}
.order-management .table-pagination{font-size:0.9375rem;padding:20px}
.modal.order-modal{width:min(1020px,calc(100vw - 48px));max-width:none;padding:30px;max-height:92vh;overflow-y:auto}
.order-modal .modal-header h2{font-size:1.4375rem}
.order-modal .detail-product .order-photo{width:100px;height:124px;min-width:100px}
.order-modal .detail-product .product-info{max-width:750px}
.modal.order-modal .detail-product .table-product{display:flex;align-items:center;gap:22px}
.modal.order-modal .detail-product .product-info{flex:1;min-width:0}
.order-modal .detail-product .product-title{font-size:1.375rem;max-width:750px;line-height:1.7}
.order-modal .detail-product small{display:block;font-size:0.9375rem;line-height:1.8;color:#8a8fa0;margin-top:5px}
.order-modal .drawer-tabs{gap:12px;display:flex;align-items:center;margin:20px 0;flex-wrap:wrap}
.detail-summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;background:#f8f6ff;border:1px solid #ede7ff;border-radius:12px;padding:22px 16px;margin-bottom:20px}
.detail-summary span{display:block;color:#8a839b;font-size:0.9375rem;margin-bottom:12px}
.detail-summary strong{font-size:1.5rem;letter-spacing:-.4px;overflow-wrap:anywhere}
.detail-summary>div:last-child strong{color:var(--purple)}
.order-detail-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:26px}
.order-detail-grid .detail-row{font-size:1rem;padding:16px 0;align-items:flex-start;gap:12px}
.order-detail-grid .detail-row span{min-width:90px}
.order-detail-grid .detail-row b{font-size:1rem;line-height:1.7;text-align:right;max-width:70%;font-weight:500}
.order-modal .detail-note{font-size:0.9375rem;line-height:1.9;margin-top:20px}
.order-modal .detail-note p{margin:8px 0}
.fee-settings-panel .body-text{font-size:1rem;line-height:1.9}
.fee-settings-panel .form-hint{font-size:0.9375rem;line-height:1.9}
.fee-form{margin-top:24px;border:1px solid #e6e1f2;border-radius:10px;padding:24px;background:#fcfbff}
.fee-form-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px;flex-wrap:wrap}
.fee-form-heading h3{font-size:1.1875rem;margin:0}
.fee-form-heading span{font-size:0.9375rem;color:#8b819d}
.fee-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.fee-form label{display:block;font-size:0.9375rem;line-height:1.8;color:#70667f}
.fee-form .text-input{margin-top:7px;font-size:1rem;background:white;min-height:42px;width:100%}
.fee-office,.fee-manual{margin-top:18px}
.fee-manual .form-hint{grid-column:1/-1}
.fee-form-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px}
.fee-form-actions .button{font-size:0.9375rem;padding:11px 16px}
.profit-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.profit-table{min-width:800px;font-size:1rem}
.profit-table td{padding:22px 16px}
.order-management { container-type: inline-size; }
.orders-table th, .orders-table td { padding-inline: 10px; }
.orders-table th { white-space: normal; }
.orders-table th small { display: block; color: var(--muted); font-size: .8125rem; font-weight: 400; }
.orders-table td { padding-block: 18px; }
.orders-table th:first-child { min-width: 125px; }
.orders-table th:nth-child(2) { min-width: 255px; }
.orders-table th:nth-child(3) { min-width: 135px; }
.orders-table td:nth-child(3) { white-space: normal; overflow-wrap: anywhere; }
.orders-table th:nth-child(5), .orders-table th:nth-child(7),
.orders-table th:nth-child(8) { min-width: 164px; }
.orders-table th:last-child { min-width: 90px; }
.orders-table .purchase-cell { min-width: 164px; }
.orders-table .purchase-form { min-width: 0; }
.purchase-form label { position: relative; }
.orders-table .purchase-form label { min-width: 5.5rem; }
.orders-table .purchase-input-wrap input { width: 100%; }
.orders-table .purchase-form small, .orders-table .order-source,
.orders-table .product-info small, .orders-table .category-proof,
.orders-table .commission-source { color: var(--muted); white-space: normal; }
.orders-table .order-source { line-height: 1.5; }
.orders-table .order-link { color: #514273; }
.orders-table .product-title { line-height: 1.45; }
.orders-table .fee-warning { color: #875719 !important; }
.orders-toolbar .search-box { max-width: 100%; }
.orders-scroll-hint { display: none; }

@container (max-width: 1480px) {
  .orders-scroll-hint {
    display: block;
    margin: 0;
    padding: 9px 16px;
    background: #f8f6ff;
    color: #654c86;
    font-size: .8125rem;
  }
}

@media(max-width:1000px){.detail-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.detail-summary strong{font-size:1.375rem}.order-detail-grid{grid-template-columns:1fr}.profit-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.modal.order-modal{width:calc(100vw - 22px);padding:20px;max-height:94vh}.order-modal .modal-header h2{font-size:1.1875rem}.order-modal .detail-product .product-title{font-size:1.125rem}.order-modal .detail-product .order-photo{width:76px;height:98px;min-width:76px}.detail-summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px}.detail-summary>div:last-child{grid-column:1/-1}.detail-summary strong{font-size:1.4375rem}.order-detail-grid .detail-row,.order-detail-grid .detail-row b{font-size:0.9375rem}.fee-fields{grid-template-columns:1fr}.fee-form{padding:16px}.fee-form-actions .button{width:100%}.orders-table td{padding-top:18px;padding-bottom:18px}.fee-settings-panel .form-hint{font-size:0.875rem}}
