/* Module-specific V5 phone layouts. All changes are screen-only. */
.mobile-module-back { display:none; }
.mobile-info-fold { display:contents; }
.mobile-info-fold>summary { display:none; }
.sr-page-shell { grid-template-columns:minmax(0,1fr);min-width:0; }
.sr-page-shell>* { min-width:0;max-width:100%; }
.srv-viewer { max-width:1050px;margin:auto;min-width:0; }
.srv-heading { margin-bottom:16px; }
.srv-heading h1 { margin:5px 0 0; }
.srv-eyebrow { color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.09em; }
.srv-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px;background:var(--bg); }
.srv-actions>.btn { display:flex;justify-content:center;min-height:48px; }
.srv-controls { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--card);padding:12px;border:1px solid var(--border);border-radius:14px; }
.srv-page-controls,.srv-zoom-controls { display:flex;align-items:center;justify-content:center;gap:8px; }
.srv-controls button { display:grid;place-items:center;min-width:40px;height:40px;padding:0 10px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--blue);font:inherit;font-weight:600;cursor:pointer; }
.srv-controls button:disabled { opacity:.4;cursor:default; }
.srv-page-controls>span { min-width:58px;text-align:center;font-size:12px;font-weight:600; }
.srv-status { font-size:12px;color:var(--muted);line-height:1.6;margin:12px 2px; }
.srv-stage { width:100%;max-width:100%;min-width:0;min-height:200px;padding:12px;overflow:auto;background:#e7edf5;border:1px solid #d8e1ed;border-radius:14px;box-sizing:border-box; }
.srv-stage canvas { display:block;background:white;margin:auto;box-shadow:0 3px 14px #18334e15;max-width:none; }
.srv-stage canvas[hidden] { display:none; }
.srv-fallback { text-align:center;font-size:12px;margin:16px 0; }
@media screen and (max-width:767px) {
  .page .mobile-button-group { display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;min-width:0;width:100%; }
  .page .mobile-button-group>.btn { width:100%!important;min-width:0!important; }
  .page .mobile-button-group[hidden] { display:none!important; }
  .page .mobile-button-group>[hidden] { display:none!important; }
  .page .mobile-button-group>.mobile-return-action { order:-1; }
  .page .mobile-duplicate-back { display:none!important; }
  .page .srv-actions { position:sticky;top:calc(64px + env(safe-area-inset-top));z-index:45;padding:10px 0;margin-top:-4px; }
  .page .srv-controls { gap:8px;justify-content:center;padding:10px; }
  .page .srv-controls button { height:40px!important;min-height:40px!important; }
  .page .srv-stage { border-radius:12px; }
  :root { --r-md:14px;--r-lg:18px; }
  body { background:#f5f7fb; }
  .page,.page.page-wide { padding:18px 16px 28px!important; }
  .page h1 { margin-top:0;font-size:25px;letter-spacing:-.035em; }
  .page h2 { font-size:19px;letter-spacing:-.025em; }
  .page .subtitle { font-size:12px;line-height:1.6;overflow-wrap:anywhere; }
  .page .card { padding:18px;border-radius:17px;box-shadow:0 3px 12px #18345405; }
  .page .alert { flex-wrap:wrap;align-items:flex-start;overflow-wrap:anywhere; }
  .page .alert>div { min-width:0;max-width:100%; }
  .page .alert>strong { flex:1 1 100%; }
  .pds-download-right,.pds-download-layout,.cl-metrics { grid-template-columns:minmax(0,1fr)!important;min-width:0; }
  .pds-download-right>.btn { width:100%; }
  .cl-metric { min-width:0;overflow-wrap:anywhere; }
  .page :is(.sr-page-shell,.sr-appointments,.msr-layout) { min-width:0;grid-template-columns:minmax(0,1fr); }
  .sr-page-shell>* { min-width:0;max-width:100%; }
  .sr-hero>div:first-child { flex-basis:auto; }
  .sr-hero-actions { width:100%;min-width:0; }
  .sr-hero-actions .btn { flex:1 1 120px; }
  .page img { max-width:100%; }
  .rid-mini-logo img { width:46px;height:46px;object-fit:contain; }
  .page :is(.page-header-row,.lf-page-head,.leave-home-head,.rid-request-head,.my-profile-topbar,.access-service-head,.cert-user-head,.sr-hero) { display:flex;flex-direction:column;align-items:stretch;gap:12px; }
  .page :is(.page-header-row,.lf-page-head,.leave-home-head,.rid-request-head)>.btn { display:none; }
  .mobile-module-back { display:inline-flex;align-items:center;min-height:36px;margin:-5px 0 9px;color:var(--blue);font-size:13px;font-weight:600;text-decoration:none; }
  .page :is(.btn,button,input,select,textarea) { max-width:100%; }
  .page .btn { min-width:0!important;white-space:normal;line-height:1.35;text-align:center;justify-content:center;border-radius:11px; }
  .page :is(input[type=checkbox],input[type=radio]) { width:19px;height:19px;min-height:19px!important;flex-shrink:0;accent-color:var(--blue); }
  .page input[type=file] { width:100%;min-width:0;padding:10px;font-size:12px!important; }
  .page input[type=file]::file-selector-button { padding:9px 11px;border:0;border-radius:8px;margin-right:8px;background:var(--blue-light);color:var(--blue);font:inherit; }
  .page :is(.form-grid,.profile-grid,.access-info-grid,.access-service-grid,.cert-user-grid,.cert-gate-details,.cert-roster-gate,.rid-request-grid,.rid-repeat-panel .rid-request-grid,.leave-top-grid,.leave-action-grid,.msr-grid,.msr-main-grid,.msr-bottom-grid) { grid-template-columns:minmax(0,1fr)!important;gap:14px; }
  .page :is(.field,.form-field,.profile-field) { min-width:0;grid-column:auto!important; }
  .page :is(.form-actions,.access-service-actions,.rid-submit-row,.cert-gate-actions) { min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:10px; }
  .page :is(.form-actions,.access-service-actions,.rid-submit-row,.cert-gate-actions)>.btn { width:100%; }
  .page :is(.profile-header,.profile-header-main,.pn-profile-header-hero) { min-width:0;overflow-wrap:anywhere; }
  .profile-header { flex-wrap:wrap;padding:20px!important;gap:16px; }
  .page :is(.cert-gate-identity,.cert-gate-body,.rid-current-id,.rid-repeat-panel) { padding:18px;min-width:0; }
  .page .cert-gate-actions .btn { min-width:0; }
  .leave-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px; }
  .leave-stat { padding:12px!important;min-width:0; }
  .leave-hero-card { padding:20px!important;min-height:0!important; }
  .leave-hero-card h1,.leave-hero-card h2 { font-size:24px!important; }
  .leave-action-card { padding:18px!important;min-height:0!important;border-radius:16px; }
  .leave-guide { padding:18px; }

  /* Home: small service tiles, a short welcome, and optional supporting detail. */
  .my-dash-hero { display:block!important;padding:22px!important;margin-bottom:22px;border-radius:22px!important;box-shadow:none!important; }
  .my-dash-hero-eyebrow { font-size:9px!important;margin-bottom:14px!important;letter-spacing:.11em; }
  .page .my-dash-hero-copy h1 { font-size:25px!important;line-height:1.2!important;margin:0 0 9px!important; }
  .my-dash-hero-copy p { font-size:12px!important;line-height:1.65!important; }
  .my-dash-section-head { align-items:center;gap:10px;margin-bottom:13px!important; }
  .my-dash-section-head h2 { font-size:19px; }
  .my-dash-section-note,.my-dash-section-eyebrow { display:none; }
  .my-dash-card-block { padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important; }
  .my-dash-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:11px!important; }
  .my-dash-service-card { min-width:0;min-height:148px!important;display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;text-align:left!important;flex-direction:column;padding:17px 14px!important;border:1px solid #e2e9f2!important;border-radius:18px!important;box-shadow:0 4px 10px #213c6004!important;gap:0;background:#fff; }
  .my-dash-service-card .dash-icon-badge { width:41px;height:41px;margin:0 0 13px!important;border-radius:13px!important;background:var(--blue-light)!important;box-shadow:none!important;color:var(--blue)!important; }
  .my-dash-service-card .dash-icon-badge .icon { color:var(--blue)!important;width:21px;height:21px; }
  .my-dash-service-card h3 { margin:0!important;font-size:13px!important;font-weight:650;line-height:1.4;overflow-wrap:anywhere; }
  .my-dash-service-card p { display:none; }
  .my-dash-service-card .my-dash-open { margin-top:10px;font-size:10px; }
  .my-dash-service-card .badge-pill { display:block;width:fit-content;margin:5px 0 0!important;font-size:9px!important; }
  .my-dash-service-card::after { display:none!important; }
  .my-dash-workspace { display:flex!important;flex-direction:column;gap:12px;margin-top:18px; }
  .my-dash-workspace-side { order:-1;display:grid;grid-template-columns:minmax(0,1fr);gap:12px; }
  .my-dash-side-card { padding:18px!important;border-radius:18px; }
  .my-dash-side-card.is-blue { display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:13px;align-items:center; }
  .my-dash-side-card.is-blue>span { grid-row:1/4;width:40px;height:40px;margin:0; }
  .my-dash-side-card.is-blue>strong { font-size:25px; }
  .my-dash-side-card.is-blue>p { margin:3px 0;font-size:12px; }
  .my-dash-side-card.is-blue>a { grid-column:2;font-size:11px; }
  .my-dash-side-card.is-privacy { display:none; }
  .mobile-info-fold { display:block;border:1px solid var(--border);border-radius:14px;background:var(--card);overflow:hidden; }
  .mobile-info-fold>summary { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px;font-size:12px;font-weight:650;list-style:none;cursor:pointer; }
  .mobile-info-fold>summary::after { content:'+';font-size:20px;font-weight:400; }
  .mobile-info-fold[open]>summary::after { content:'−'; }
  .mobile-info-fold>summary::-webkit-details-marker { display:none; }
  .my-dash-hero .mobile-info-fold { margin-top:17px;background:#ffffff12;border-color:#ffffff30;color:#fff; }
  .my-dash-hero-overview { padding:0 16px 16px!important;border:0!important;border-radius:0!important;background:transparent!important; }
  .my-dash-workspace-main { border:0;padding:16px!important; }
  .my-dash-guidance { display:flex;flex-direction:column;padding:0 15px 15px;gap:10px; }
  .my-dash-guidance-card { padding:13px!important; }
  .my-dash-workspace+.mobile-info-fold { margin-top:12px; }

  /* Leave filing: one flowing input form instead of a shrunken paper sheet. */
  .lf-module,.lf-workspace,.form6-flip-card { width:100%;max-width:100%;min-width:0; }
  .lf-workspace { display:flex;flex-direction:column;gap:16px; }
  .form6-flip-card { perspective:none!important; }
  .form6-face { transition:none!important;transform:none!important;backface-visibility:visible!important; }
  .form6-face.front { display:block; }
  .form6-face.back { display:none!important;position:static!important; }
  .form6-flip-card.is-flipped .form6-face.front { display:none; }
  .form6-flip-card.is-flipped .form6-face.back { display:block!important; }
  .form6-paper { padding:16px!important;overflow:visible!important;border:1px solid var(--border);border-radius:18px;box-shadow:none; }
  .form6-actions-top { margin:0 0 16px; }
  .form6-actions-top .btn { width:100%;font-size:11px;padding:10px!important; }
  .form6-head { display:block!important;margin-bottom:18px; }
  .form6-head>div:first-child,.form6-head .form6-stamp { display:none; }
  .form6-head img { width:46px;height:46px; }
  .form6-head .form6-small { font-size:9px;line-height:1.5; }
  .form6-title { font-size:18px;margin:10px 0 0; }
  .form6-table,.form6-table>tbody,.form6-table>tbody>tr { display:block;width:100%!important;min-width:0!important;max-width:100%; }
  .form6-table { margin:0; }
  .form6-table>tbody>tr>td { display:block;width:100%!important;max-width:100%;padding:18px 0;border:0;border-bottom:1px solid var(--border);box-sizing:border-box; }
  .form6-table>tbody>tr>th { display:block;width:100%;box-sizing:border-box;padding:12px 10px;border:0;border-radius:9px;font-size:11px;line-height:1.5; }
  .form6-top-row.one,.form6-top-row.two { display:grid;grid-template-columns:minmax(0,1fr)!important;gap:16px;padding:0;min-height:0; }
  .form6-top-row.one>div,.form6-top-row.two>div { display:block;white-space:normal;padding:0; }
  .form6-label { display:block;font-size:10px;color:var(--muted);line-height:1.5;margin-bottom:5px; }
  .form6-name { display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
  .form6-name>.form6-label { grid-column:1/-1; }
  .form6-name>span:empty { display:none; }
  .form6-name small { font-size:10px; }
  .form6-line-text { display:block;width:100%;padding:8px 0;border:0;font-size:13px;text-align:left;overflow-wrap:anywhere; }
  .form6-name .form6-line-text { font-size:12px; }
  .form6-table>tbody>tr>td>strong { display:block;font-size:11px;line-height:1.6;padding-right:20px; }
  .form6-help { float:right;margin-top:-22px; }
  .form6-list { display:grid;gap:6px;margin-top:10px; }
  .form6-list label,.form6-choice { display:flex;align-items:flex-start;gap:9px;min-height:40px;line-height:1.5;padding:9px 0;font-size:12px; }
  .form6-list small { font-size:10px;line-height:1.5; }
  .form6-input,.form6-line-input { border:1px solid #dce4ee!important;border-radius:10px!important;padding:11px!important;background:#f9fbfd!important;width:100%;min-width:0;font-size:16px!important; }
  .detail-block { margin-top:16px; }
  .detail-block em { display:block;font-size:11px;line-height:1.6;color:var(--muted); }
  .form6-date-grid,.date-row { display:flex!important;flex-direction:column;gap:12px; }
  .date-row label { flex:auto; }
  .date-group { max-width:100%;padding:12px!important; }
  .leave-calendar { max-width:100%;min-width:0; }
  .leave-calendar-grid button { min-height:36px!important;height:36px;font-size:12px; }
  .form6-upload { padding:13px 0;max-width:100%; }
  .form6-upload small { display:block;line-height:1.6;font-size:11px; }
  .form6-admin-zone::after { font-size:19px;width:100%; }
  .form6-admin-table,.form6-admin-table>tbody,.form6-admin-table>tbody>tr,.form6-admin-table>tbody>tr>td { display:block;width:100%!important;max-width:100%; }
  .form6-mini-table { width:100%;min-width:0;font-size:10px; }
  .form6-mini-table td { padding:5px!important;white-space:normal; }
  .lf-side { position:static;display:grid!important;grid-template-columns:minmax(0,1fr)!important;width:100%; }
  .lf-instructions-grid { display:grid;grid-template-columns:minmax(0,1fr);gap:18px; }
  .lf-table { min-width:0;font-size:11px; }
  .lf-table td,.lf-table th { overflow-wrap:anywhere;padding:8px; }
  .form6-actions,.form6-submit-row,.lf-submit-row { display:flex;flex-direction:column;gap:10px; }
  .form6-footer-actions { display:flex;flex-direction:column;gap:10px; }
  .form6-footer-actions .btn { width:100%;padding:12px!important; }
  .rid-form-grid,.rid-request-layout,.rid-roster-grid,.rid-hero { grid-template-columns:minmax(0,1fr)!important;min-width:0; }
  .rid-field.full { grid-column:auto; }
  .rid-live-preview { position:static!important;min-width:0;max-width:100%; }
  .rid-mini-pair { grid-template-columns:minmax(0,1fr)!important; }
  .rid-mini-card { max-width:100%;min-width:0; }

  /* Requests, notices and PDS entries retain their controls in labelled cards. */
  table.mobile-record-list,table.mobile-record-list>tbody { display:block;width:100%!important;min-width:0!important;border:0; }
  table.mobile-record-list>thead { display:block; }
  table.mobile-record-list>thead>tr { display:block; }
  table.mobile-record-list>thead th { display:none!important; }
  table.mobile-record-list>thead th:first-child:has(input[type=checkbox]) { display:flex!important;align-items:center;gap:9px;min-width:0!important;width:auto!important;border:0;padding:10px 0;background:transparent; }
  table.mobile-record-list>thead th:first-child:has(input[type=checkbox])::after { content:'Select all';font-size:12px;text-transform:none; }
  table.mobile-record-list>tbody>tr { display:block;position:relative;margin:0 0 12px;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--card); }
  table.mobile-record-list>tbody>tr>td { display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;align-items:start;width:100%!important;min-width:0!important;max-width:100%;border:0!important;padding:8px 0!important;white-space:normal!important;font-size:12px;overflow-wrap:anywhere; }
  table.mobile-record-list>tbody>tr>td::before { content:attr(data-mobile-label);color:var(--muted);font-size:10px;line-height:1.6;font-weight:600; }
  table.mobile-record-list>tbody>tr>td:has(.mrq-no-select) { display:none; }
  table.mobile-record-list>tbody>tr>td.mobile-select-cell { display:flex;justify-content:flex-end;padding:0 0 5px!important; }
  table.mobile-record-list>tbody>tr>td.mobile-select-cell::before { content:'Select';margin-right:4px; }
  table.mobile-record-list>tbody>tr>td>* { min-width:0;max-width:100%; }
  table.mobile-record-list input,table.mobile-record-list select { min-width:0!important; }
  .mrq-container { padding:15px!important; }
  .page .request-numbers { min-width:0!important;max-width:100%; }
  .mrq-container-head { align-items:flex-start;gap:10px; }
  .mrq-container-head h2 { font-size:17px; }
  .mrq-toolbar { bottom:calc(88px + env(safe-area-inset-bottom))!important;max-width:calc(100vw - 24px); }
  .nt-stat-row { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
  .nt-stat { min-width:0;padding:12px 15px;box-shadow:none; }
  .nt-toolbar { gap:8px; }
  .nt-toolbar .btn { flex:1;min-width:90px!important;font-size:11px; }
  .nt-toolbar .nt-select-all { width:100%; }
  #nt-form.card { padding:14px; }
  #nt-form .nt-notice-title,#nt-form .nt-notice-body { grid-column:2; }
  #nt-form .nt-notice-title strong { font-size:13px; }
  #nt-form .nt-notice-body { font-size:12px;line-height:1.65; }
  .pdsb-page,.pdsb-form,.pdsb-formbody { min-width:0;max-width:100%; }
  .pdsb-fields,.pdsb-name-fields,.pdsb-birth-fields,.pdsb-address-fields,.pdsb-id-fields,.pdsb-parent .pdsb-fields { grid-template-columns:minmax(0,1fr)!important;gap:14px; }
  .pdsb-fields>* { grid-column:auto!important;min-width:0; }
  .pdsb-entry-table>tbody>tr>td { grid-template-columns:minmax(0,1fr)!important;gap:6px!important; }
  .pdsb-entry-table>tbody>tr>td .pdsb-row-label { max-width:100%; }
  .pdsb-table-scroll { overflow:visible!important; }
  .pdsb-table-scroll:has(table:not(.mobile-record-list)) { overflow:auto!important; }
  .pdsb-panelhead,.pdsb-formbody { padding:16px!important; }
  .pdsb-form fieldset { min-width:0;padding:14px!important; }
  .pdsb-actions { position:static!important;display:flex;flex-direction:column;padding:14px!important; }
  .pdsb-section-pager { flex-wrap:wrap;gap:8px; }
  .pdsb-section-pager>.btn { flex:1;font-size:11px; }

  /* Admin modules: collapse toolbars and columns, keep official ledgers scrollable. */
  .adv4-hero,.adv4-main-grid,.adv4-bottom-grid,.adv4-module-grid,.srd-main-grid,.srd-grid,.cert-admin-grid,.am-grid,.am-layout,.rid-dashboard-grid { grid-template-columns:minmax(0,1fr)!important;min-width:0; }
  .adv4-hero-main { padding:22px!important;min-height:0!important; }
  .adv4-hero-main h1 { font-size:25px!important; }
  .adv4-panel,.adv4-scope-card { padding:17px!important; }
  .page .list-search-input { flex-basis:100%;min-width:0; }
  .page .list-search-bar { gap:8px; }
  .page .list-search-bar>.btn { flex:1;font-size:12px; }
  .page .pager-controls { width:100%;display:flex;justify-content:space-between;gap:8px; }
  .page .pager-controls .pager-btn { min-width:0;padding:9px;font-size:10px;white-space:normal; }
  .acc-dialog { width:calc(100vw - 28px)!important;max-height:85dvh;overflow:auto;padding:22px!important; }
  .acc-dialog-actions { display:flex;gap:10px; }
  .acc-dialog-actions .btn { flex:1; }
  .mobile-menu-links a,.mobile-menu-links .mobile-install { min-height:48px;padding:11px 12px;font-size:13px; }
  .mobile-menu-heading { padding:21px 22px 15px; }
  .mobile-menu-heading h2 { font-size:21px; }
  .topbar-primary { min-height:64px;padding:9px 16px; }
  .topbar-brand-name { font-size:19px; }
  .topbar-brand-sub { display:block;font-size:8px; }
  .console-footer { margin:15px 0 0;padding:12px 0; }
  .console-footer-context span { font-size:9px; }

  /* Sign in: compact brand header and a full-width, thumb-friendly form. */
  body:has(.split-login-shell) { background:#fff; }
  .split-login-left { padding:25px 24px 18px!important;background:#fff!important;border-bottom:1px solid #edf0f6;color:var(--ink); }
  .split-left-content,.split-left-decoration { display:none!important; }
  .split-brand-logos { justify-content:center!important;margin:0!important;gap:18px!important; }
  .split-brand-logos img { height:45px!important;width:auto; }
  .split-login-right { padding:26px 24px!important;background:#fff!important; }
  .split-form-card { background:transparent!important;border:0!important;box-shadow:none!important; }
  .split-form-card .brand { color:var(--blue);font-size:13px;font-weight:800;letter-spacing:.09em; }
  .split-form-card h2 { margin-top:8px!important;margin-bottom:7px!important;font-size:29px;letter-spacing:-.04em; }
  .split-form-card .subtitle { font-size:13px;margin-bottom:25px; }
  .split-form-card .input { min-height:52px;background:#f8fafc!important;border:1px solid #dfe6f0!important;border-radius:12px!important;box-shadow:none; }
  .split-form-card .input:focus { outline:2px solid #96bafb;outline-offset:2px; }
  .split-form-card .field { margin-bottom:19px; }
  .split-form-card label { font-size:12px; }
  .split-form-card .first-login-help { margin-top:20px;padding:14px;border-radius:13px; }
  .split-form-card .first-login-help-title { font-size:12px; }
  .split-form-card .first-login-help-text,.split-form-card .credential-help-link { font-size:11px;line-height:1.5; }
  .personnel-status-tabs { padding:4px!important;background:#f0f4f9!important;border-radius:12px!important; }
  .personnel-status-tabs .status-tab { min-height:42px;font-size:12px; }
  .mobile-login-install { font-size:11px;max-width:100%;border:0;background:#f6f9fd;padding:12px;width:100%; }
  .split-form-footer { margin-top:20px;font-size:10px; }
}
@media screen and (max-width:359px) {
  .page,.page.page-wide { padding-left:12px!important;padding-right:12px!important; }
  .my-dash-service-card { padding:14px 11px!important; }
  .my-dash-service-card h3 { font-size:12px!important; }
  table.mobile-record-list>tbody>tr>td { grid-template-columns:76px minmax(0,1fr);gap:8px; }
  .form6-name { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media print { .mobile-module-back { display:none; }.mobile-info-fold { display:contents; }.mobile-info-fold>summary { display:none; } }

/* Compact request filters, clear hierarchy and equal-width paired actions. */
@media screen and (max-width:767px) {
  .page .page-header-row { height:auto;min-height:0;gap:12px;margin-bottom:18px; }
  .page .page-header-title { flex:0 0 auto!important;min-width:0;width:100%;height:auto;min-height:0; }
  .page .page-header-title .subtitle { margin-bottom:0; }
  .page .mrq-status-filters { display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;margin:0 0 16px!important; }
  .page .mrq-status-filters>.btn { width:100%!important;min-width:0!important; }
  .page .mrq-container-head { margin-bottom:16px;min-height:0;gap:10px; }
  .page .mrq-container-head>div { min-width:0;flex:1 1 0; }
  .page .mrq-container-head h3 { font-size:15px;line-height:1.4; }
  .page .mrq-container-head .subtitle { font-size:12px;line-height:1.55; }
  .page .mrq-view-tabs { margin-bottom:12px!important; }
  .page .mrq-view-tabs>.btn { flex:1 1 auto!important; }
  .page:has(#mrq-form)>.list-search-bar { display:grid;grid-template-columns:minmax(0,1fr);gap:8px; }
  .page:has(#mrq-form)>.list-search-bar .list-search-input { width:100%;max-width:none; }
  .page:has(#mrq-form)>.list-search-bar>.btn { width:100%; }
  .page .mobile-record-list td[data-mobile-label="Status"]>.badge-pill { grid-column:2;justify-self:start;width:fit-content;max-width:100%; }
  .page .mobile-record-list .mobile-request-note { grid-column:1/-1;margin-top:4px;border-color:var(--border);background:#f8fafc;border-radius:10px; }
  .page .mobile-request-note>summary { padding:10px 12px;min-height:40px;font-size:11px; }
  .page .mobile-request-note>.mrq-status-note { margin:0!important;padding:0 12px 12px;font-size:12px!important;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere; }
  .page .mobile-record-list td[data-mobile-label="Action"][data-mobile-empty="true"] { display:none!important; }
  .page>div:has(>div>a[href="service_record_history.php"]) { display:flex;flex-direction:column;align-items:stretch!important;gap:14px!important;min-height:0; }
  .page>div:has(>div>a[href="service_record_history.php"])>div:last-child { display:grid!important;grid-template-columns:minmax(0,1fr);width:100%;gap:9px!important; }
  .page>div:has(>div>a[href="service_record_history.php"])>div:last-child>.btn { width:100%!important; }
  .page .msr-top-grid { gap:14px;margin-bottom:18px; }
  .page .msr-hero { padding:22px;gap:20px;border-radius:18px;box-shadow:none;min-height:0;justify-content:flex-start; }
  .page .msr-hero p { max-width:100%;font-size:13px;line-height:1.6; }
  .page .msr-hero-eyebrow { font-size:10px;margin-bottom:12px; }
  .page .msr-hero-actions>.btn.primary { background:#fff!important;color:var(--blue-dark)!important;border-color:#fff!important;width:100%; }
  .page .msr-howto { padding:20px;box-shadow:none;border-radius:18px; }
  .page .form6-admin-zone::after { display:none; }
  .page .mobile-admin-review { margin:2px 0;background:#f6f9fd; }
  .page .mobile-admin-review>summary { padding:14px;font-size:12px; }
  .page .mobile-admin-review .form6-admin-zone-content { padding:12px; }
}

/* Unified phone controls and the dynamically-created leave date entries. */
@media screen and (max-width:767px) {
  .page :is(.btn,.tiny-btn,.pager-btn),.acc-dialog-actions .btn {
    box-sizing:border-box!important;display:inline-flex;align-items:center;justify-content:center;
    gap:8px;min-height:48px!important;height:auto!important;min-width:0!important;
    padding:12px 16px!important;border-radius:12px!important;font-family:inherit!important;
    font-size:13px!important;font-weight:600!important;line-height:22px!important;
    text-align:center;white-space:normal;vertical-align:middle;
  }
  .page :is(.btn,.tiny-btn)>.icon { width:18px;height:18px;flex:0 0 18px; }
  .page :is(.btn,.tiny-btn):disabled { opacity:.5;cursor:default; }
  .page :is(.form-actions,.form6-footer-actions,.access-service-actions,.rid-submit-row,.cert-gate-actions) :is(.btn,.tiny-btn) { width:100%; }
  .page .list-search-bar>.btn,.page .nt-toolbar>.btn { flex:1 1 110px; }
  .page :is(.ccr-icon-btn,.srip-icon-btn,.ccs-icon-btn) { width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;flex:0 0 44px; }
  .page .date-group { padding:12px!important;border-radius:16px;background:#f6f9fe;border-color:#dce6f4; }
  .page .date-group-head { align-items:flex-start;flex-wrap:wrap;gap:7px;margin-bottom:12px; }
  .page .date-group-head strong { font-size:13px;line-height:1.5;flex:1 1 120px;min-width:0;overflow-wrap:anywhere; }
  .page .date-total { font-size:10px;line-height:1.5;white-space:normal;max-width:100%;padding:5px 9px; }
  .page .dateRows { display:grid;grid-template-columns:minmax(0,1fr);gap:12px; }
  .page .date-row { display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;justify-items:stretch;gap:12px;margin:0;padding:14px;border:1px solid #dce5f1;border-radius:14px;background:#fff;min-width:0;width:100%;box-sizing:border-box; }
  .page .date-row label { display:flex;flex-direction:column;align-items:stretch;gap:7px;flex:none;width:100%;min-width:0;margin:0;font-size:11px;font-weight:600;color:#586b85; }
  .page .date-row label[hidden] { display:none!important; }
  .page .date-row :is(input:not([type=hidden]),select) { box-sizing:border-box;width:100%!important;min-width:0!important;max-width:100%;height:48px!important;min-height:48px!important;padding:10px 12px!important;margin:0;border:1px solid #d8e2ef;border-radius:10px;background:#f9fbfe;font-family:inherit;font-size:16px!important;line-height:normal;color:#172d4d; }
  .page .date-row input[type=date] { appearance:none;-webkit-appearance:none; }
  .page .date-row input[type=date]::-webkit-date-and-time-value { text-align:left; }
  .page .date-row .tiny-btn.remove { width:100%;min-height:48px!important;color:#b42318;background:#fff3f1;border:1px solid #f5d7d2;border-radius:10px!important; }
  .page .leave-calendar { padding:12px;border-radius:14px;margin-top:12px;min-width:0; }
  .page .leave-calendar-controls { display:grid;grid-template-columns:minmax(0,1fr);gap:12px; }
  .page .leave-calendar-controls label { width:100%;min-width:0;font-size:11px;line-height:1.5; }
  .page .leave-calendar-controls :is(select,input) { box-sizing:border-box;height:48px!important;min-height:48px!important;padding:10px;border:1px solid #d8e2ef;border-radius:10px;font:inherit;font-size:16px!important; }
  .page .leave-calendar-head { margin:16px 0 10px; }
  .page .leave-calendar-head button { box-sizing:border-box;width:40px!important;height:40px!important;min-height:40px!important;border-radius:11px;font-size:21px;padding:0;display:grid;place-items:center; }
  .page .leave-calendar-head strong { font-size:12px;line-height:1.5;text-align:center; }
  .page .leave-calendar-grid { gap:3px; }
  .page .leave-calendar-grid button { width:100%;min-width:0;height:36px!important;min-height:36px!important;padding:0!important;border-radius:9px;font-size:12px;font-weight:600;line-height:36px; }
  .page .leave-calendar-grid button[aria-pressed=true] { background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 2px 5px #1352d32b; }
  .page .leave-calendar-grid small { font-size:10px; }
  .page .leave-calendar-status { margin:12px 0;font-size:11px;line-height:1.6; }
  .page .leave-calendar [data-calendar-add] { width:100%;background:var(--blue);color:#fff; }
  .page .auto-days-note { font-size:11px;line-height:1.6; }
  .page #lf-days { font-size:21px!important;color:var(--blue);font-weight:700; }
  body .page :is(.btn.btn.btn,.tiny-btn.tiny-btn,.pager-btn.pager-btn),.acc-dialog-actions .btn.btn {
    flex-grow:0!important;flex-shrink:0!important;flex-basis:auto!important;
    height:48px!important;min-height:48px!important;max-height:48px!important;
    padding:5px 14px!important;line-height:18px!important;font-size:13px!important;
    border-radius:12px!important;box-sizing:border-box!important;
  }
  .page :is(.cert-gate-actions,.pdsb-action-buttons,.po-main-tabs,.pds-actions) { display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important; }
  .page :is(.cert-gate-actions,.pdsb-action-buttons,.po-main-tabs,.pds-actions)>.btn { width:100%!important; }
  .page .profile-header-actions { display:flex;flex-direction:column;align-items:stretch;gap:10px;width:100%; }
  .page .profile-header-actions .btn { width:100%; }
  .page a.btn[href="leave_credits.php"] { width:100%; }
  .page>div:has(>div>a[href^="leave_credits_pdf.php"]) { flex-direction:column!important;align-items:stretch!important; }
  .page>div:has(>div>a[href^="leave_credits_pdf.php"])>div:last-child { width:100%;flex-direction:column;align-items:stretch; }
  .page>div:has(>div>a[href^="leave_credits_pdf.php"])>div:last-child>.btn { width:100%; }
  .page .pds-search { display:flex;flex-wrap:wrap;gap:10px; }
  .page .pds-search>.btn { flex:1 1 110px!important; }
  body .page .pds-admin-card #pds-bulk-download { height:48px!important;min-height:48px!important;max-height:48px!important;padding:5px 14px!important; }
  .page table:not(.mobile-record-list) .btn { min-width:150px!important; }
  .page table.mobile-record-list>tbody>tr>td[data-mobile-label="Action"] { grid-template-columns:minmax(0,1fr);gap:6px; }
  .page table.mobile-record-list>tbody>tr>td[data-mobile-label="Action"]>div { width:100%; }
  .page table.mobile-record-list>tbody>tr>td[data-mobile-label="Action"] .btn { width:100%; }
  body .page :is(.btn.btn.ccr-icon-btn,.btn.btn.srip-icon-btn,.btn.btn.ccs-icon-btn) { width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:0!important; }
}
