/* AMNKO route-specific components.
 * R16.9.10.46.24C — extracted from application views during A-Z style sanitation.
 * Only specialised components live here; shared buttons, tables, filters and shell
 * remain owned by their canonical stylesheets.
 */


/* shifts/index.php */
body.amnko-r9[data-amnko-route="shifts"] .shift-review-table .js-shift-drilldown{ font-weight: inherit; color: inherit; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-review-table .js-shift-drilldown:hover{ text-decoration: underline !important; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-clickable-table tbody tr.js-shift-drilldown-row,
body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable{ cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-clickable-table tbody tr.js-shift-drilldown-row:hover{ background: rgba(13,110,253,.045); }
        body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable:hover{ box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.10) !important; transform: translateY(-1px); }
        body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable .btn,
body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable a,
body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable input,
body.amnko-r9[data-amnko-route="shifts"] .shift-card-clickable form{ cursor: auto; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-summary-card .shift-mini-tile{ min-height: 86px; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-method-chip{ font-size:.82rem; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-mobile-only{ display:none; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-details-dialog{ max-width: min(1440px, 98vw); }
        body.amnko-r9[data-amnko-route="shifts"] .shift-drilldown-card{ border: 1px solid rgba(0,0,0,.08); border-radius: 1rem; overflow: hidden; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-drilldown-table td,
body.amnko-r9[data-amnko-route="shifts"] .shift-drilldown-table th{ white-space: nowrap; }
        body.amnko-r9[data-amnko-route="shifts"] .shift-drilldown-table td.shift-desc{ white-space: normal; min-width: 260px; }
        /* Mobile: make tab bar scrollable instead of wrapping */
        @media (max-width: 991px){
            body.amnko-r9[data-amnko-route="shifts"] .shifts-tabs{ flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
            body.amnko-r9[data-amnko-route="shifts"] .shifts-tabs .nav-link{ white-space: nowrap; }
            body.amnko-r9[data-amnko-route="shifts"] .shifts-page .card-body{ padding: 1rem !important; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-mobile-only{ display:block !important; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-desktop-expanded{ display:none !important; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-summary-card{ border-radius: 1rem !important; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-summary-card .card-body{ padding: .9rem 1rem !important; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-summary-card:hover{ transform:none; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-summary-card .h6{ font-size: .98rem; }
            body.amnko-r9[data-amnko-route="shifts"] .shift-details-dialog{ max-width: 100vw; margin: 0; }
            body.amnko-r9[data-amnko-route="shifts"] #shiftDetailsModal .modal-content,
body.amnko-r9[data-amnko-route="shifts"] #shiftDrilldownModal .modal-content{ border-radius: 0 !important; min-height: 100vh; }
            body.amnko-r9[data-amnko-route="shifts"] #shiftDetailsModal .modal-body,
body.amnko-r9[data-amnko-route="shifts"] #shiftDrilldownModal .modal-body{ padding-bottom: 5rem !important; }
            body.amnko-r9[data-amnko-route="shifts"] #shiftDetailsModal .table-responsive,
body.amnko-r9[data-amnko-route="shifts"] #shiftDrilldownModal .table-responsive{ overflow-x: auto; -webkit-overflow-scrolling: touch; }

            /* Better stacked-table layout on mobile to avoid cramped actions near the bottom-nav */
            body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="إغلاق"],
body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="الإجراء"]{
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
            }
            body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="إغلاق"] .btn,
body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="الإجراء"] .btn{
                width: 100%;
            }
            body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="ملخص"]{
                align-items: flex-start;
            }
            body.amnko-r9[data-amnko-route="shifts"] .shifts-page .table-responsive-stack td[data-label="ملخص"] > .d-flex{ width: 100%; }
        }


/* delivery/index.php */
body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-columns{ align-items:stretch; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-column{ display:flex; flex-direction:column; min-height:100%; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-column .card-body{ max-height:68vh; overflow:auto; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-card{ display:block; width:100%; border:1px solid #e5e7eb; border-radius:1rem; background:#fff; box-shadow:0 .25rem .75rem rgba(15,23,42,.06); transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-card:hover{ transform:translateY(-1px); box-shadow:0 .6rem 1.2rem rgba(15,23,42,.10); border-color:#cbd5e1; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-card .order-metrics{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.35rem .75rem; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-section-note{ color:#64748b; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-order-note,
body.amnko-r9[data-amnko-route="delivery"] .delivery-order-note-preview{ white-space:pre-wrap; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-order-trigger{ text-decoration:none; color:inherit; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-order-trigger .delivery-card-body{ padding:1rem; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-modal-panel .btn{ min-height:46px; font-weight:700; }
    body.amnko-r9[data-amnko-route="delivery"] .delivery-modal-metric{ border:1px solid #e5e7eb; border-radius:1rem; background:#f8fafc; padding:.85rem 1rem; }
    @media (max-width: 1199px){
      body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-grid{ grid-template-columns:1fr; }
    }
    @media (max-width: 991px){
      body.amnko-r9[data-amnko-route="delivery"] .delivery-touch-column .card-body{ max-height:none; }
      body.amnko-r9[data-amnko-route="delivery"] .delivery-modal-panel .btn{ width:100%; }
    }


/* inventory/products.php */
/* Reuse styling from OLD.php for overlay */
  body.amnko-r9[data-amnko-route="products"] .pos-topnotice-overlay{ position:fixed; inset:0; z-index:9999; display:flex; justify-content:center; align-items:flex-start; padding:72px 12px 12px 12px; background:rgba(0,0,0,.08); }
  body.amnko-r9[data-amnko-route="products"] .pos-topnotice{ width:min(560px, 100%); background:#fff; border:2px solid #00b8d9; border-radius:14px; box-shadow:0 14px 35px rgba(0,0,0,.18); padding:14px 14px 12px 14px; }
  body.amnko-r9[data-amnko-route="products"] .pos-topnotice-title{ font-weight:800; margin-bottom:8px; text-align:right; }
  body.amnko-r9[data-amnko-route="products"] .pos-topnotice-body{ text-align:right; line-height:1.7; white-space:pre-line; margin-bottom:12px; }
  body.amnko-r9[data-amnko-route="products"] .pos-topnotice-actions{ display:flex; justify-content:flex-start; gap:8px; }


/* inventory/purchases_new.php */
body.amnko-r9[data-amnko-route="purchases_new"] .pos-topnotice-overlay{ position:fixed; inset:0; z-index:9999; display:flex; justify-content:center; align-items:flex-start; padding:72px 12px 12px 12px; background:rgba(0,0,0,.08); }
  body.amnko-r9[data-amnko-route="purchases_new"] .pos-topnotice{ width:min(560px, 100%); background:#fff; border:2px solid #00b8d9; border-radius:14px; box-shadow:0 14px 35px rgba(0,0,0,.18); padding:14px 14px 12px 14px; }
  body.amnko-r9[data-amnko-route="purchases_new"] .pos-topnotice-title{ font-weight:800; margin-bottom:8px; text-align:right; }
  body.amnko-r9[data-amnko-route="purchases_new"] .pos-topnotice-body{ text-align:right; line-height:1.7; white-space:pre-line; margin-bottom:12px; }
  body.amnko-r9[data-amnko-route="purchases_new"] .pos-topnotice-actions{ display:flex; justify-content:flex-start; gap:8px; }


/* admin/users.php */
body.amnko-r9[data-amnko-route="users"] .users-mobile-list{display:none;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.06);padding:14px;margin-bottom:12px;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-meta div{background:#f8fafc;border:1px solid rgba(15,23,42,.06);border-radius:14px;padding:9px 10px;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-meta span{display:block;color:#64748b;font-size:.76rem;font-weight:800;margin-bottom:3px;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-meta strong{display:block;color:#0f172a;font-size:.88rem;word-break:break-word;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-actions .btn,
body.amnko-r9[data-amnko-route="users"] .user-mobile-actions form{width:100%;}
  body.amnko-r9[data-amnko-route="users"] .user-mobile-actions form .btn{width:100%;}
  @media (max-width:767.98px){
    body.amnko-r9[data-amnko-route="users"] .users-desktop-table{display:none!important;}
    body.amnko-r9[data-amnko-route="users"] .users-mobile-list{display:block;}
    body.amnko-r9[data-amnko-route="users"] .user-mobile-actions{grid-template-columns:1fr;}
  }


/* customers/ledger.php */
@media print {
    .no-print, .sidebar, .mobile-bottom-nav, .nav-tabs, form { display: none !important; }
    main, .content, .container-fluid { margin:0 !important; width:100% !important; max-width:100% !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
    .table { font-size: 12px; }
  }


/* inventory/supplier_ledger.php print mode */
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .sidebar,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .mobile-bottom-nav,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .btn,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .nav-tabs,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] form { display:none !important; }
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] main,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .content,
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .container-fluid { margin:0 !important; width:100% !important; max-width:100% !important; }
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] body { background:#fff !important; }
body.amnko-r9.amnko-print-mode[data-amnko-route="supplier_ledger"] .card { box-shadow:none !important; border:1px solid #ddd !important; }

/* R16.9.10.46.24.3 — final live consistency guard.
   The HTML hidden contract must win over every route/button display rule. */
[hidden],
.amnko-auto-submit-control,
[data-amnko-legacy-filter-submit="1"] {
  display: none !important;
}
body.amnko-r9.amnko-unified-actions-r169104621-v1 .amnko-btn.amnko-auto-submit-control[hidden],
body.amnko-r9.amnko-unified-actions-r169104621-v1 .amnko-btn[data-amnko-legacy-filter-submit="1"] {
  display: none !important;
}
