/* PC1: Small-screen record cards. Screen-only rules preserve print tables. */
@media screen and (max-width:760px) {
  #main-content .jtg-table-container {min-width:0;max-width:100%;}
  #main-content .jtg-mobile-table {display:block!important;width:100%!important;min-width:0!important;border:0;border-collapse:separate;table-layout:auto;}
  #main-content .jtg-mobile-table > thead {position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap;border:0!important;}
  #main-content .jtg-mobile-table > tbody {display:block!important;width:100%;}
  #main-content .jtg-mobile-table > tbody > .jtg-table-record {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;padding:12px;margin:0 0 12px;background:#fff;border:1px solid #dce4ef;border-radius:12px;width:100%!important;box-sizing:border-box;}
  #main-content .jtg-mobile-table .jtg-table-record > td {display:block;min-width:0!important;max-width:100%;width:auto!important;padding:9px 0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere;text-align:start!important;font-size:14px;line-height:1.5;}
  #main-content .jtg-mobile-table .jtg-table-record > td::before {content:attr(data-mobile-label);display:block;color:#64748b;font-size:11px;font-weight:650;line-height:1.4;margin-bottom:4px;letter-spacing:.02em;white-space:normal;}
  #main-content .jtg-mobile-table .jtg-table-record > td:first-child, #main-content .jtg-mobile-table .jtg-table-record > .jtg-table-actions {grid-column:1/-1;}
  #main-content .jtg-mobile-table .jtg-table-record > td:first-child {border-bottom:1px solid #edf1f7!important;padding-bottom:10px!important;font-weight:650;}
  #main-content .jtg-mobile-table .jtg-table-actions {padding-top:8px!important;}
  #main-content .jtg-mobile-table button, #main-content .jtg-mobile-table a[href] {min-height:44px;max-width:100%;white-space:normal;touch-action:manipulation;}
  #main-content .jtg-mobile-table button {padding:10px 12px;}
  #main-content .jtg-mobile-table input:not([type=checkbox]):not([type=radio]), #main-content .jtg-mobile-table select {max-width:100%;min-height:44px;font-size:16px;}
  #main-content .jtg-mobile-table input[type=checkbox] {width:24px;height:24px;}
  #main-content .jtg-mobile-table .jtg-table-message, #main-content .jtg-mobile-table .jtg-table-message > td {display:block!important;width:100%!important;}
  #main-content .jtg-mobile-table .jtg-table-message > td::before {content:none;}
  #returns-app {padding:14px 10px 40px;}
  #returns-app .rt-panel {padding:12px;}
  #returns-app .rt-header h1 {font-size:21px;}
  #returns-app .rt-header p {font-size:13px;}
}
/* PC1: Compact Control Center header, filters and complete mobile record fields. */
.tc-record-details summary, .tc-selection-tools > summary {cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;color:#334155;list-style:revert;}
.tc-record-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0;}
.tc-record-fields > div {min-width:0;}
.tc-record-fields dt {font-size:11px;color:#64748b;margin-bottom:3px;}
.tc-record-fields dd {margin:0;font-size:13px;overflow-wrap:anywhere;white-space:normal;font-variant-numeric:tabular-nums;}
@media screen and (max-width:760px) {
  #tables-control > header {position:static!important;}
  #tables-control > header > div {padding:12px;}
  #tables-control .tc-heading-row {gap:10px;}
  #tables-control h1 {font-size:18px;line-height:1.3;letter-spacing:-.25px;}
  #tables-control .tc-subtitle {font-size:12px;line-height:1.45;margin-top:4px;}
  #tables-control .tc-header-actions {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
  #tables-control .tc-header-actions button {font-size:13px;min-height:44px;padding:8px 12px;}
  #tables-control > main {padding:12px;}
  #tables-control .tc-overview {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px;}
  #tables-control .tc-overview > div {padding:12px;border-radius:12px;}
  #tables-control .tc-overview p {font-size:11px;letter-spacing:0;}
  #tables-control .tc-overview p + p {font-size:22px;line-height:1.2;}
  #tables-control .tc-selection-body {gap:8px;}
  #tables-control button {min-height:44px;touch-action:manipulation;}
  #tables-control input:not([type=checkbox]):not([type=radio]), #tables-control select {font-size:16px;min-height:44px;max-width:100%;}
  #tables-control .tc-mobile-record {padding:12px;border-radius:12px;}
  #tables-control .tc-mobile-record > div:first-child {gap:8px;flex-wrap:wrap;}
  #tables-control .tc-mobile-record input[type=checkbox] {width:26px;height:26px;flex-shrink:0;}
  #tables-control .tc-mobile-record h4, #tables-control .tc-mobile-record .tc-title {font-size:14px;overflow-wrap:anywhere;}
  #tables-control .tc-record-details {border-top:1px solid #edf1f7;margin-top:8px;}
}

@media screen and (max-width:760px) {
  #main-content .jtg-mobile-table .jtg-table-record > [hidden],
  #main-content .jtg-mobile-table .jtg-table-record > .hidden,
  #main-content .jtg-mobile-table .jtg-table-record > [style*="display: none"],
  #main-content .jtg-mobile-table .jtg-table-record > [style*="display:none"] {display:none!important;}
}
.tc-record-details > summary::before, .tc-selection-tools > summary::before {content:'›';font-size:20px;line-height:1;}
.tc-record-details[open] > summary::before, .tc-selection-tools[open] > summary::before {transform:rotate(90deg);}
/* PC1: Shared page headings and form sizing across every base-layout page. */
@media screen and (max-width:760px) {
  #main-content .jtg-page {min-width:0;}
  #main-content .jtg-page h1 {font-size:clamp(18px,4.8vw,22px)!important;line-height:1.3!important;letter-spacing:-.3px!important;overflow-wrap:anywhere;}
  #main-content .jtg-page header p, #main-content .jtg-page h1 + p {font-size:13px!important;line-height:1.5!important;overflow-wrap:anywhere;}
  #main-content .jtg-page header {gap:12px;}
  #main-content .jtg-page header button, #main-content .jtg-page header a[href] {min-height:44px;font-size:13px;white-space:normal;}
  #main-content .jtg-page input:not([type=checkbox]):not([type=radio]):not([type=range]),
  #main-content .jtg-page select, #main-content .jtg-page textarea {font-size:16px;max-width:100%;box-sizing:border-box;}
  #main-content .jtg-mobile-scroll {min-width:560px;}
  #main-content .jtg-table-scroll-container {overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch;}
}
/* PC1: Existing card renderers share the same visual pattern and keep their events. */
@media screen and (max-width:760px) {
  #jtg-sales-workspace tbody > tr,
  #jtg-users tbody > tr,
  #main-content .print-studio .studio-job-table tbody > tr,
  #investor-app-root table.responsive-cards tbody > tr,
  .document-view .item-table tbody > tr {
    border:1px solid #dce4ef!important;border-radius:12px!important;padding:12px!important;
    margin:0 0 12px!important;gap:0 14px!important;background:#fff;box-shadow:none!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0;box-sizing:border-box;
  }
  #jtg-sales-workspace tbody > tr > td,
  #jtg-users tbody > tr > td,
  #main-content .print-studio .studio-job-table tbody > tr > td,
  #investor-app-root table.responsive-cards tbody > tr > td,
  .document-view .item-table tbody > tr > td {
    font-size:14px!important;line-height:1.5!important;overflow-wrap:anywhere;min-width:0;
  }
  #jtg-sales-workspace td::before, #jtg-users td::before,
  #main-content .print-studio .studio-job-table td::before,
  #investor-app-root .cell-label, .document-view .item-table td[data-label]::before {
    font-size:11px!important;font-weight:650!important;color:#64748b;margin-bottom:4px;
  }
  #investor-app-root table.responsive-cards tbody {grid-template-columns:1fr!important;gap:0!important;}
  #main-content .print-studio .studio-job-table td {grid-column:auto!important;}
  #main-content .print-studio .studio-job-table td:first-child,
  #main-content .print-studio .studio-job-table td:last-child {grid-column:1/-1!important;}
  #investor-app-root h1 {font-size:22px!important;line-height:1.3!important;overflow-wrap:anywhere;}
  #investor-app-root table button, #jtg-users table button,
  #jtg-sales-workspace table button, #main-content .print-studio table button {min-height:44px;touch-action:manipulation;}
}
@media screen and (max-width:760px) {
  #jtg-users table, #jtg-users tbody,
  .document-view .item-table, .document-view .item-table tbody {display:block!important;width:100%!important;min-width:0!important;table-layout:auto;}
  #jtg-users thead, .document-view .item-table thead {position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap;}
  #jtg-users tbody > tr, .document-view .item-table tbody > tr {display:grid!important;}
  #jtg-users td, .document-view .item-table td {display:block;width:auto!important;min-width:0;}
  #jtg-users td:first-child, #jtg-users td:last-child, .document-view .item-table td.description {grid-column:1/-1;}
  .document-view .item-table td.number {display:none;}
  .document-view h1 {font-size:22px!important;line-height:1.3!important;}
  #main-content .jtg-mobile-table td .num {white-space:normal!important;overflow-wrap:anywhere;}
}
