/* PhotoSales Studio 5.3.0-5 — Smart Tables 2.0
   Progressive table layer: no business logic and no forced card conversion. */
:root{
  --pss-table-border:#dbe5ee;
  --pss-table-head:#f6f9fc;
  --pss-table-hover:#f7fbff;
  --pss-table-ink:#17324d;
  --pss-table-muted:#64748b;
  --pss-table-radius:14px;
}
.pss-smart-table-shell{position:relative;min-width:0;max-width:100%}
.pss-smart-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
.pss-smart-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;color:var(--pss-table-ink)}
.pss-smart-table th,.pss-smart-table td{min-width:0;padding:12px 14px;border-bottom:1px solid var(--pss-table-border);vertical-align:middle}
.pss-smart-table thead th{position:sticky;top:0;z-index:3;background:var(--pss-table-head);color:#36516a;font-size:.78rem;font-weight:900;line-height:1.25;letter-spacing:.025em;text-align:left;white-space:nowrap;box-shadow:0 1px 0 var(--pss-table-border)}
.pss-smart-table tbody tr{transition:background-color .14s ease}
.pss-smart-table tbody tr:hover{background:var(--pss-table-hover)}
.pss-smart-table tbody tr:focus-within{outline:2px solid #7db7dc;outline-offset:-2px}
.pss-smart-table tbody tr:last-child td{border-bottom:0}
.pss-smart-table [data-pss-table-col="number"],.pss-smart-table [data-pss-table-col="date"],.pss-smart-table [data-pss-table-col="status"]{white-space:nowrap}
.pss-smart-table [data-pss-table-col="number"]{font-variant-numeric:tabular-nums;text-align:right}
.pss-smart-table [data-pss-table-col="actions"]{width:1%;min-width:128px;text-align:right;white-space:normal}
.pss-smart-table [data-pss-table-col="actions"]>.btn,.pss-smart-table [data-pss-table-col="actions"]>button,.pss-smart-table [data-pss-table-col="actions"]>a{margin:2px;vertical-align:middle}
.pss-smart-table .pss-table-primary{font-weight:800;color:#17324d}
.pss-smart-table .pss-table-secondary{display:block;margin-top:3px;color:var(--pss-table-muted);font-size:.82rem;line-height:1.35}
.pss-smart-table-caption{padding:10px 14px;color:var(--pss-table-muted);font-size:.84rem;text-align:left}
.pss-smart-table-scroll:focus{outline:2px solid #7db7dc;outline-offset:2px;border-radius:var(--pss-table-radius)}
.pss-table-scroll-hint{display:none;margin:8px 2px 0;color:var(--pss-table-muted);font-size:.78rem}
.pss-smart-table-shell[data-pss-overflow="1"] .pss-table-scroll-hint{display:block}
.pss-smart-table[data-pss-density="compact"] th,.pss-smart-table[data-pss-density="compact"] td{padding-top:8px;padding-bottom:8px}
.pss-smart-table[data-pss-density="comfortable"] th,.pss-smart-table[data-pss-density="comfortable"] td{padding-top:15px;padding-bottom:15px}
@media(max-width:1199px){
  .pss-smart-table th,.pss-smart-table td{padding-left:11px;padding-right:11px}
  .pss-smart-table [data-pss-table-col="actions"]{min-width:112px}
}
@media(max-width:767px){
  /* Existing specialised mobile-card rules retain priority. This layer only improves real scroll tables. */
  .pss-smart-table-scroll{border-radius:12px}
  .pss-smart-table:not([data-pss-mobile-cards="1"]){min-width:max(640px,100%)}
  .pss-smart-table thead th{position:static}
  .pss-table-scroll-hint{display:block}
}
@media(hover:none) and (pointer:coarse){
  .pss-smart-table-scroll{scroll-snap-type:x proximity}
  .pss-smart-table th,.pss-smart-table td{scroll-snap-align:start}
}
@media(prefers-reduced-motion:reduce){.pss-smart-table tbody tr{transition:none}}

/* PhotoSales Studio 5.3.0-5a — Orders horizontal scroll correction
   The orders table keeps natural readable column widths instead of compressing
   all content into the desktop card width. */
@media (min-width:768px){
  .admin-shell:not(.admin-login-mode) .pss-orders-table-wrap{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable both-edges;
  }
  .admin-shell:not(.admin-login-mode) .pss-orders-table-wrap > table.smart-orders-table{
    width:max-content!important;
    min-width:1540px!important;
    max-width:none!important;
    table-layout:auto!important;
  }
  .admin-shell:not(.admin-login-mode) table.smart-orders-table col{
    width:auto!important;
  }
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th,
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td{
    width:auto!important;
    max-width:none!important;
    overflow:visible!important;
    box-sizing:border-box;
  }
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(1),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(1){min-width:185px!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(2),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(2){min-width:190px!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(3),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(3){min-width:165px!important;white-space:nowrap!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(4),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(4){min-width:175px!important;white-space:nowrap!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(5),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(5){min-width:105px!important;white-space:nowrap!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(6),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(6){min-width:110px!important;white-space:nowrap!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(7),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(7){min-width:125px!important;white-space:nowrap!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(8),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(8){min-width:185px!important}
  .admin-shell:not(.admin-login-mode) table.smart-orders-table th:nth-child(9),
  .admin-shell:not(.admin-login-mode) table.smart-orders-table td:nth-child(9){min-width:285px!important}

  .admin-shell:not(.admin-login-mode) table.smart-orders-table .order-number,
  .admin-shell:not(.admin-login-mode) table.smart-orders-table .order-channel-pill{
    white-space:nowrap!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  .admin-shell:not(.admin-login-mode) table.smart-orders-table .smart-order-actions{
    min-width:255px!important;
  }
}
