/* ============ Page-specific ============ */
.ap-card{background:var(--ap-surface); border:1px solid var(--ap-border); border-radius:var(--ap-radius); box-shadow:var(--ap-shadow);}
.ap-card-head{padding:1.1rem 1.25rem; border-bottom:1px solid var(--ap-border);}
.ap-card-body{padding:1.25rem;}
.btn-ap-primary{background:var(--ap-primary); border-color:var(--ap-primary); color:#fff; font-weight:600; font-size:.85rem;}
.btn-ap-primary:hover{background:var(--ap-primary-600); border-color:var(--ap-primary-600); color:#fff;}
.btn-ap-light{background:var(--ap-bg); border-color:var(--ap-border); color:var(--ap-text-strong); font-weight:600; font-size:.85rem;}
.btn-ap-light:hover{background:var(--ap-border);}
.btn-ap-light.active{background:var(--ap-primary-100); border-color:var(--ap-primary-100); color:var(--ap-primary);}

/* Stat cards (clickable status filters) */
.ap-stat{padding:1.1rem 1.3rem; display:flex; align-items:center; gap:.9rem; cursor:pointer; border:1px solid var(--ap-border); transition:border-color .15s ease;}
.ap-stat.active{border-color:var(--ap-primary); background:var(--ap-primary-100);}
.ap-stat-icon{width:42px; height:42px; border-radius:var(--ap-radius-sm); display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0;}
.ap-stat-label{font-size:.76rem; color:var(--ap-secondary); font-weight:600;}
.ap-stat-value{font-size:1.3rem; font-weight:800; color:var(--ap-text-strong); letter-spacing:-.02em;}

/* Filters */
.ap-filter-input, .ap-filter-select{background:var(--ap-bg); border:1px solid var(--ap-border); border-radius:var(--ap-radius-sm); font-size:.83rem; color:var(--ap-text-strong); padding:.5rem .75rem;}
.ap-filter-input:focus, .ap-filter-select:focus{outline:none; border-color:var(--ap-primary); background:var(--ap-surface);}

/* Table */
.ap-table thead th{font-size:.72rem; color:var(--ap-secondary); font-weight:700; border-bottom:1px solid var(--ap-border); padding:.75rem .6rem; white-space:nowrap; cursor:pointer; user-select:none;}
.ap-table thead th:hover{color:var(--ap-text-strong);}
.ap-table thead th i{font-size:.65rem; margin-left:.15rem; color:var(--ap-secondary);}
.ap-table tbody td{padding:.8rem .6rem; border-bottom:1px solid var(--ap-border); vertical-align:middle; font-size:.85rem; color:var(--ap-text);}
.ap-table tbody tr:last-child td{border-bottom:none;}
.ap-table tbody tr:hover{background:var(--ap-bg);}
.ap-cell-strong{color:var(--ap-text-strong); font-weight:600;}
.ap-cell-sub{font-size:.76rem; color:var(--ap-secondary);}
.ap-avatar{width:32px; height:32px; border-radius:50%; object-fit:cover;}
.ap-badge{font-size:.72rem; font-weight:700; padding:.32rem .6rem; border-radius:20px; display:inline-flex; align-items:center; gap:.3rem;}
.ap-badge.success{background:var(--ap-success-100); color:var(--ap-success);}
.ap-badge.warning{background:var(--ap-warning-100); color:var(--ap-warning);}
.ap-badge.danger{background:var(--ap-danger-100); color:var(--ap-danger);}
.ap-badge.info{background:var(--ap-info-100); color:var(--ap-info);}
.ap-badge .bi{font-size:.5rem;}
.ap-pay-chip{font-size:.75rem; display:inline-flex; align-items:center; gap:.35rem; color:var(--ap-text);}
.ap-row-check{cursor:pointer;}
.ap-action-btn{width:32px; height:32px; border-radius:var(--ap-radius-sm); border:1px solid var(--ap-border); background:var(--ap-surface); color:var(--ap-secondary); display:inline-flex; align-items:center; justify-content:center;}
.ap-action-btn:hover{background:var(--ap-bg); color:var(--ap-text-strong);}

/* Order details modal */
.ap-order-step{display:flex; align-items:center; flex:1;}
.ap-order-step .circle{width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.85rem; font-weight:700; background:var(--ap-bg); color:var(--ap-secondary); border:2px solid var(--ap-border); flex-shrink:0;}
.ap-order-step.done .circle{background:var(--ap-success); border-color:var(--ap-success); color:#fff;}
.ap-order-step.current .circle{background:var(--ap-primary); border-color:var(--ap-primary); color:#fff;}
.ap-order-step .line{flex:1; height:2px; background:var(--ap-border); margin:0 .4rem;}
.ap-order-step.done .line{background:var(--ap-success);}
.ap-order-step-label{font-size:.7rem; color:var(--ap-secondary); text-align:center; margin-top:.4rem;}
.ap-item-row{display:flex; align-items:center; gap:.75rem; padding:.7rem 0; border-bottom:1px solid var(--ap-border);}
.ap-item-row:last-child{border-bottom:none;}
.ap-item-thumb{width:42px; height:42px; border-radius:var(--ap-radius-sm); object-fit:cover;}
.ap-summary-row{display:flex; justify-content:space-between; font-size:.85rem; padding:.35rem 0;}
.ap-summary-row.total{font-weight:800; color:var(--ap-text-strong); font-size:1rem; border-top:1px solid var(--ap-border); padding-top:.6rem; margin-top:.3rem;}

.modal-content{border-radius:var(--ap-radius); border:1px solid var(--ap-border); background:var(--ap-surface);}
.modal-header, .modal-footer{border-color:var(--ap-border);}

/* 5-column stat row on xl screens */
@media (min-width: 1200px){
  .col-xl-2dot4{ flex:0 0 20%; max-width:20%; }
}
