/* ============ 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 */
.ap-stat{padding:1.2rem 1.35rem; display:flex; align-items:center; gap:1rem;}
.ap-stat-icon{width:44px; height:44px; border-radius:var(--ap-radius-sm); display:flex; align-items:center; justify-content:center; font-size:1.2rem; flex-shrink:0;}
.ap-stat-label{font-size:.78rem; color:var(--ap-secondary); font-weight:600;}
.ap-stat-value{font-size:1.35rem; font-weight:800; color:var(--ap-text-strong); letter-spacing:-.02em;}

/* Category chips */
.ap-cat-chip{
  border:1px solid var(--ap-border); background:var(--ap-surface); color:var(--ap-text-strong);
  border-radius:20px; padding:.4rem .9rem; font-size:.8rem; font-weight:600; white-space:nowrap; cursor:pointer;
  display:inline-flex; align-items:center; gap:.4rem;
}
.ap-cat-chip .count{font-size:.7rem; color:var(--ap-secondary); font-weight:700;}
.ap-cat-chip.active{background:var(--ap-primary); border-color:var(--ap-primary); color:#fff;}
.ap-cat-chip.active .count{color:rgba(255,255,255,.8);}

/* 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);}

/* Grid view product cards */
.ap-prod-card{background:var(--ap-surface); border:1px solid var(--ap-border); border-radius:var(--ap-radius); overflow:hidden; height:100%; display:flex; flex-direction:column; transition:box-shadow .15s ease;}
.ap-prod-card:hover{box-shadow:var(--ap-shadow);}
.ap-prod-img-wrap{position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--ap-bg);}
.ap-prod-img-wrap img{width:100%; height:100%; object-fit:cover;}
.ap-prod-stock-tag{position:absolute; top:.6rem; left:.6rem;}
.ap-prod-fav{position:absolute; top:.6rem; right:.6rem; width:30px; height:30px; border-radius:50%; background:rgba(255,255,255,.9); display:flex; align-items:center; justify-content:center; color:var(--ap-secondary); font-size:.9rem; border:0;}
.ap-prod-body{padding:.9rem 1rem 1rem; flex:1; display:flex; flex-direction:column;}
.ap-prod-cat{font-size:.7rem; color:var(--ap-secondary); font-weight:700; text-transform:uppercase; letter-spacing:.03em; margin-bottom:.2rem;}
.ap-prod-name{font-size:.9rem; font-weight:700; color:var(--ap-text-strong); margin-bottom:.35rem; line-height:1.3;}
.ap-prod-rating{font-size:.75rem; color:var(--ap-warning); margin-bottom:.5rem;}
.ap-prod-rating span{color:var(--ap-secondary); margin-left:.2rem;}
.ap-prod-foot{display:flex; justify-content:space-between; align-items:center; margin-top:auto; padding-top:.6rem; border-top:1px solid var(--ap-border);}
.ap-prod-price{font-size:1.05rem; font-weight:800; color:var(--ap-text-strong);}
.ap-prod-price small{font-size:.75rem; font-weight:500; color:var(--ap-secondary); text-decoration:line-through; margin-left:.3rem;}
.ap-prod-actions{display:flex; gap:.35rem;}
.ap-prod-icon-btn{width:30px; height:30px; border-radius:var(--ap-radius-sm); border:1px solid var(--ap-border); background:var(--ap-bg); color:var(--ap-secondary); display:flex; align-items:center; justify-content:center; font-size:.85rem;}
.ap-prod-icon-btn:hover{background:var(--ap-border); color:var(--ap-text-strong);}

/* 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;}
.ap-table tbody td{padding:.7rem .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-prod-thumb-sm{width:42px; height:42px; border-radius:var(--ap-radius-sm); 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 .bi{font-size:.5rem;}
.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);}

.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);}
.form-label{font-size:.82rem; font-weight:600; color:var(--ap-text-strong);}
.form-control, .form-select{background:var(--ap-bg); border:1px solid var(--ap-border); border-radius:var(--ap-radius-sm); font-size:.85rem; color:var(--ap-text-strong);}
.form-control:focus, .form-select:focus{border-color:var(--ap-primary); box-shadow:0 0 0 3px var(--ap-primary-100);}
.ap-upload-box{border:2px dashed var(--ap-border); border-radius:var(--ap-radius-sm); padding:1.5rem; text-align:center; color:var(--ap-secondary); font-size:.83rem; background:var(--ap-bg);}
.ap-view-toggle .btn{padding:.4rem .6rem;}
