:root{font:14px/1.5 Arial,"Noto Sans Thai",sans-serif;color:#24384d;background:#edf2f7;--blue:#225c91;--border:#d5dfe9}*{box-sizing:border-box}body{margin:0;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto}a{color:#205c90;text-decoration:none}a:hover{text-decoration:underline}button,input,select{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid #b9cadb;background:#fff;color:#234b70;padding:.5rem .9rem;border-radius:4px;cursor:pointer;white-space:nowrap}button:hover,.button:hover{background:#e7f0f9;text-decoration:none}button.primary{background:var(--blue);color:#fff;border-color:var(--blue)}input,select{border:1px solid #b9cadb;border-radius:4px;padding:.55rem .7rem;background:#fff;color:#233d55}input:focus,select:focus,button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:3px solid #7eb2df;outline-offset:2px}.app-header{height:64px;display:flex;align-items:center;gap:2rem;background:#173f65;color:white;padding:0 1.6rem;box-shadow:0 1px 6px #183d6033;position:relative;z-index:20}.brand{font-weight:700;letter-spacing:.04em;font-size:20px;color:white;white-space:nowrap}.brand span{font-size:13px;font-weight:400;color:#c4d7e9}.brand:hover{text-decoration:none}.app-header nav{display:flex;align-items:center;height:100%;gap:.35rem}.app-header nav>a,.app-header summary{padding:1.3rem .85rem;cursor:pointer;color:#fff;list-style:none}.app-header summary::-webkit-details-marker{display:none}.app-header summary:after{content:"⌄";margin-left:.55rem;font-size:12px}.app-header details{position:relative}.menu{position:absolute;left:0;top:100%;min-width:230px;background:white;border:1px solid var(--border);box-shadow:0 7px 20px #173f6530;padding:.4rem;z-index:30;border-radius:4px}.menu a{display:block;padding:.6rem .7rem;color:#234b70;border-radius:3px}.menu a:hover{background:#edf4fa;text-decoration:none}.account{margin-left:auto;display:flex;align-items:center;gap:1rem;font-size:13px}.account form{margin:0}.link-button{background:transparent;color:white;border-color:#7c9db9;padding:.3rem .7rem}.link-button:hover{color:#173f65}#main-content{overflow:auto;padding:1.35rem 1.5rem 2rem;scrollbar-gutter:stable}.app-footer{height:32px;padding:.4rem 1.5rem;font-size:11px;color:#6a7e90;border-top:1px solid var(--border);background:#f8fafc}.panel{background:white;border:1px solid var(--border);border-radius:5px;box-shadow:0 2px 4px #1d4d7408;overflow:hidden}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem 1.3rem;border-bottom:1px solid var(--border)}h1{font-size:21px;line-height:1.3;margin:0;font-weight:600;color:#244867}.page-heading p{margin:.3rem 0 0;color:#6a7e90;font-size:13px}.record-count{padding:.25rem .65rem;background:#edf4fa;border-radius:15px;font-size:12px;color:#34658d;white-space:nowrap}.toolbar{display:flex;align-items:center;gap:.55rem;padding:.85rem 1.2rem;background:#f7f9fc;border-bottom:1px solid var(--border)}.search-field input{width:280px}.page-size{margin-left:auto;display:flex;align-items:center;gap:.5rem;color:#5c7185}.table-scroll{overflow:auto;max-width:100%}table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}th{padding:.75rem .8rem;background:#2f699d;color:white;font-weight:500;white-space:nowrap;border-right:1px solid #4d7fa9}td{padding:.6rem .8rem;border-bottom:1px solid #e2e9f0;vertical-align:middle;white-space:nowrap}tbody tr:nth-child(even){background:#f1f6fb}tbody tr:hover{background:#e9f2fa}.people-table{min-width:1450px}.people-table th:first-child,.people-table td:first-child{padding:.5rem .6rem}.row-open{font-size:18px;line-height:1;color:#2c6fa6}.avatar{width:30px;height:34px;background:#dce9f4;color:#577e9f;border:1px solid #c7d8e7;display:inline-flex;align-items:center;justify-content:center;font-size:10px;border-radius:3px}.pagination{padding:.8rem 1.15rem;display:flex;align-items:center;justify-content:space-between;color:#6a7e90;font-size:12px;background:#fafcfe}.pagination>div{display:flex;align-items:center;gap:.8rem}.pagination .button{padding:.35rem .7rem}.empty{padding:2rem;text-align:center;color:#6a7e90}.person-tabs{display:flex;border-bottom:1px solid #b9cadb;background:#f5f8fc;padding:0 1rem;gap:.15rem;overflow:auto}.person-tabs a,.person-tabs button{padding:.9rem 1rem;white-space:nowrap;border-bottom:3px solid transparent;color:#50718e}.person-tabs a[aria-current],.person-tabs button[aria-selected="true"]{color:#235e94;border-color:#2f76ad;background:#fff;font-weight:600}.summary-dates{margin-left:1rem;color:#4e708e}.form-sections{padding:1.3rem;display:grid;gap:1.15rem}.form-block{border:1px solid var(--border);border-radius:4px;overflow:hidden}.form-block h2,.child-window>h2{font-size:14px;font-weight:600;color:#29577d;padding:.7rem 1rem;background:#edf4fa;margin:0;border-bottom:1px solid var(--border)}.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;margin:0;padding:.6rem 1rem}.field{display:grid;grid-template-columns:minmax(140px,38%) 1fr;gap:1rem;padding:.55rem .7rem;border-bottom:1px solid #edf1f5;min-width:0}.field dt{font-size:12px;color:#60768b}.field dd{margin:0;min-height:1.5em;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.child-window{max-height:32rem;overflow:auto;margin:1.2rem;border:1px solid var(--border);border-radius:4px}.form-block .child-window{margin:.8rem}.child-window th{position:sticky;top:0}.child-window>h2{position:sticky;top:0;z-index:2}.child-window>h2+table th{top:43px}.notice{margin:1rem;padding:.8rem 1rem;border:1px solid #d7e3ee;background:#f3f7fb;color:#45627c;border-radius:4px}.notice.error{background:#fff2f2;color:#994345;border-color:#eacbcb;margin:1rem 0}.past-date{color:#c33232}.login-card{max-width:410px;margin:7vh auto;background:white;padding:2.1rem 2.2rem;border:1px solid var(--border);border-radius:6px;box-shadow:0 8px 30px #214e7410}.eyebrow{font-size:11px;letter-spacing:.14em;color:#6e8ca5;margin-bottom:.7rem}.login-card h1{margin-bottom:1.6rem}.login-card label{display:block;font-size:13px;color:#55718b;margin-bottom:1.1rem}.login-card input{display:block;width:100%;margin-top:.35rem}.login-card button{width:100%;margin:.3rem 0 1rem}.login-switch{font-size:12px}.error-page{padding:2rem;max-width:700px;margin:5vh auto}.error-page p{margin:1rem 0 1.5rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(max-width:760px){.app-header{height:auto;min-height:64px;padding:.6rem 1rem;gap:.5rem;flex-wrap:wrap}.brand{font-size:17px}.app-header nav{order:3;width:100%;height:auto}.app-header nav>a,.app-header summary{padding:.5rem .7rem}.account{font-size:11px;gap:.5rem}#main-content{padding:.8rem}.field-grid{grid-template-columns:1fr}.field{grid-template-columns:42% 1fr;padding:.5rem 0}.summary-dates{display:block;margin:.3rem 0 0}.toolbar{flex-wrap:wrap}.search-field{flex:1}.search-field input{width:100%}.page-size{margin-left:0}.page-heading{padding:1rem}.form-sections{padding:.8rem}.person-tabs{padding:0}.person-tabs a,.person-tabs button{padding:.7rem}.pagination{gap:.5rem}.login-card{margin:4vh auto;padding:1.5rem}.child-window{margin:.8rem}.account span{max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.account a{color:#fff}.language-links{display:flex;flex-wrap:wrap;gap:.6rem;margin:0 0 1.25rem}.language-links a[aria-current]{font-weight:700;text-decoration:underline}.language-options{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}.language-options button{width:auto;margin:0;min-width:6rem;min-height:44px}
@media(max-width:760px){.account{flex-wrap:wrap;justify-content:flex-end}.account span{max-width:100px}}

.profile-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.6rem}.profile-edit summary{padding:.7rem 1rem;background:#edf4fa;color:#29577d;font-weight:600;cursor:pointer}.edit-field{min-width:0;display:grid;align-content:start;gap:.3rem;padding:.55rem .7rem}.edit-field label,.edit-field .field-label{font-size:12px;color:#4f6579}.edit-field input,.edit-field select,.edit-field textarea{width:100%;min-width:0}.edit-field textarea{font:inherit;border:1px solid #b9cadb;border-radius:4px;padding:.55rem .7rem;resize:vertical}.edit-field .field-value{white-space:pre-wrap;overflow-wrap:anywhere}.field-error{color:#994345}.edit-field [aria-invalid=true]{border-color:#994345}.profile-edit .profile-actions button{min-height:44px}
.edit-field[hidden]{display:none}
.address-select{display:contents}
.follower-actions{padding:.75rem .8rem 0}
.upload-results{margin:0;padding-inline-start:1.5rem;overflow-wrap:anywhere}.upload-results progress{max-width:100%}#type-guidance,#file-rules{margin:.15rem 0;color:#4f6579}

.upload-drop{border:1px dashed var(--border);border-radius:4px}.upload-drop.drop-ready{background:#e7f0f9;border-color:#2f76ad}

.photo-panel{display:flex;align-items:flex-start;flex-wrap:wrap;gap:1rem}.card-photo{width:120px;aspect-ratio:300/399;object-fit:contain;background:#fff;border:1px solid var(--border);border-radius:4px}.photo-thumb{width:34px;height:45px;object-fit:contain;background:#fff;border-radius:3px}.photo-remove{display:inline-flex;gap:.45rem;align-items:center;margin:.35rem .45rem}.edit-field .photo-remove input{width:auto}.photo-panel p{margin:.35rem 0}.photo-panel .edit-field{flex:1 1 250px}

.date-confirm{padding:.7rem 1rem 1rem}.date-confirm button{min-height:44px}

.mail-body{white-space:pre-wrap;overflow-wrap:anywhere}.form-block>summary{padding:.7rem 1rem;cursor:pointer}

.invoice-groups {
    display: grid;
    gap: .75rem;
    padding: 0 1rem 1rem;
}
.invoice-group {
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 0;
}
.invoice-group > summary {
    background: #edf4fa;
    cursor: pointer;
    padding: .75rem 1rem;
}
.invoice-report table {
    min-width: 62rem;
}
.invoice-report th,
.invoice-report td {
    white-space: normal;
}
.invoice-weekly td:last-child,
.invoice-annual td:nth-last-child(-n + 4) {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}
.finance-flag {
    background: #ffe0dd;
    color: #861e14;
    font-weight: bold;
}

.report-filters {
    padding: .65rem 1.2rem;
}
.report-filters summary {
    cursor: pointer;
    font-weight: 600;
}
.report-filters fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 0;
    padding: .45rem;
    min-width: 0;
}
.report-filters input {
    min-width: 0;
    max-width: 100%;
}
.summary-chart {
    margin: 1rem 1.2rem;
}
.summary-chart figcaption {
    font-weight: 600;
}
.summary-chart svg {
    display: block;
    min-width: 520px;
    font-size: 12px;
    fill: #18324a;
}
.summary-axis {
    stroke: #b7c6d4;
}
.summary-bar {
    fill: #2f699d;
}
.report-page .page-heading {
    flex-wrap: wrap;
}
.report-page .profile-actions {
    min-width: 0;
}
.report-page .profile-actions .button {
    white-space: normal;
}
.people-pagination, .people-pagination > div {
    flex-wrap: wrap;
}
.people-pagination input[type="number"] {
    width: 5rem;
}
.person-documents th a {
    color: inherit;
}
.security-directory .sort-heading {
    color: inherit;
}
.security-directory .page-heading {
    flex-wrap: wrap;
}
.person-documents .pagination,
.person-documents .pagination > div {
    flex-wrap: wrap;
}
.person-documents input[type="number"] {
    width: 5rem;
}
.report-month {
    background: #e8f0f7;
    color: #234b70;
    text-align: left;
}

@media (max-width: 760px) {
    .app-header nav {
        position: relative;
        flex-wrap: wrap;
    }
    .app-header nav details {
        position: static;
    }
    .app-header nav .menu {
        right: 0;
        min-width: 0;
    }
}

.branch-table input[name="branch"] {
  width: min(100%, 35rem);
  min-width: 12rem;
}
.reference-dialog {
  width: min(42rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: white;
  color: inherit;
}
.reference-dialog::backdrop {
  background: rgb(23 63 101 / 45%);
}

.document-maintenance .page-heading p {
  overflow-wrap: anywhere;
}
.document-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.document-notes {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-width: 12rem;
  max-width: 26rem;
}
.document-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
  margin: .8rem;
}
.document-toolbar > .toolbar {
  margin: 0;
}
.document-upload-actions {
  margin-left: auto;
  justify-content: flex-end;
}
.document-toolbar:not(:has(.toolbar:not(.grid-source), .document-upload-actions)) {
  display: none;
}
.document-maintenance .page-heading > div {
  min-width: 0;
}
.document-maintenance .confirmation {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.document-maintenance .confirmation input {
  flex: none;
  margin: .3rem 0 0;
}
.document-maintenance .profile-actions > * {
  min-height: 44px;
}
.document-maintenance .danger {
  background: #8f2c2c;
  color: #fff;
  border-color: #8f2c2c;
}
.document-maintenance .danger:hover {
  background: #742323;
}

@media (max-width: 760px) {
  .person-documents .toolbar {
    flex-wrap: wrap;
  }
  .person-documents .toolbar .search-field {
    flex: 1 1 100%;
    min-width: 0;
  }
  .person-documents .toolbar .search-field input {
    width: 100%;
  }
}

[hidden]{display:none!important}
.person-tabs button{border:0;border-bottom:3px solid transparent;border-radius:0;background:transparent;font-weight:inherit}
.person-tabs button[aria-selected="true"]{font-weight:600}

.form-block>.photo-panel{padding:.8rem 1rem}

/* Shared footer for all result grids. */
.grid-pagination{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.75rem;border-top:1px solid var(--border);padding:.6rem 1rem;color:#425c74;background:#f5f8fc;font-variant-numeric:tabular-nums}
.grid-pagination form,.grid-pagination .pagination-size,.grid-pagination .pagination-jump,.pagination-navigation,.grid-pagination label{display:flex;align-items:center;gap:.4rem;margin:0}
.grid-pagination .pagination-size{justify-self:start}.grid-pagination .pagination-navigation{justify-content:center;flex-wrap:wrap;gap:.35rem}.grid-pagination .pagination-total{justify-self:end;white-space:nowrap}
.grid-pagination button,.grid-pagination .button{min-width:2.4rem;min-height:2.25rem;padding:.25rem .6rem;background:linear-gradient(#edf6ff,#cee2f6);border-color:#a7c3df}
.grid-pagination button:disabled{opacity:.42;cursor:default}.grid-pagination select{padding:.25rem .45rem;min-height:2.25rem}.grid-pagination input[type=number]{width:4.5rem;padding:.25rem .4rem;min-height:2.25rem}
.pagination-number,.pagination-current{display:inline-flex;align-items:center;justify-content:center;min-width:1.8rem;min-height:2.1rem;padding:.15rem .35rem;border:1px solid transparent;border-radius:3px}.pagination-current{background:#ffe8a2;border-color:#efc869;color:#273e53;font-weight:700}.pagination-number:hover{background:#e2edf8;text-decoration:none}
@media(max-width:1000px){.grid-pagination{grid-template-columns:1fr auto}.grid-pagination .pagination-navigation{grid-column:1/-1;grid-row:2}.grid-pagination .pagination-total{grid-column:2;grid-row:1}}
@media(max-width:420px){.grid-pagination{padding:.6rem;gap:.5rem}.grid-pagination .pagination-total{white-space:normal;text-align:right}.grid-pagination .pagination-navigation{gap:.2rem}}

.principal-dialog{width:min(40rem,calc(100% - 2rem));max-height:calc(100dvh - 2rem);box-sizing:border-box;padding:1.3rem;border:1px solid var(--border);border-radius:6px;color:#24384d;background:#fff}
.principal-dialog::backdrop{background:rgb(23 63 101 / 45%)}
[data-principal-picker]{display:grid;gap:.65rem}
[data-principal-picker] h2{margin:0;font-size:20px;color:#244867}
[data-principal-picker] p{margin:.25rem 0}
[data-principal-picker] input,[data-principal-picker] select{width:100%;box-sizing:border-box}
[data-principal-picker] option{padding:.4rem;white-space:normal;overflow-wrap:anywhere}
[data-principal-summary]{overflow-wrap:anywhere;margin:.3rem 0}
.follower-link-dialog{padding:0;width:min(44rem,calc(100% - 2rem))}
.follower-link-dialog h1{font-size:20px}
.follower-link-dialog [data-link-follower-form] input[type=search]{flex:1;min-width:0}
.follower-link-dialog [data-link-follower-form] select{width:100%;box-sizing:border-box}
.follower-link-dialog option{padding:.4rem;white-space:normal;overflow-wrap:anywhere}
.follower-workflow-option{border:1px solid var(--border);border-radius:5px;padding:1rem;min-width:0}
.follower-workflow-option h2{margin:0 0 .4rem;font-size:17px;color:#244867}
.follower-workflow-option>p{margin:.3rem 0 .8rem;color:#5c7185}
.follower-search-fields{display:grid;gap:.65rem}
.follower-workflow-options>p{margin:0}

/* Calm, readable screens with a common editing language. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Noto Sans Thai",sans-serif;--blue:#245f8f;--border:#dce4eb;background:#f2f5f8;color:#263b4d}
button,input,select,textarea{font:inherit}button,.button{border-radius:7px;min-height:38px;transition:background-color .12s}button:disabled{cursor:default;opacity:.55}textarea:focus{outline:3px solid #7eb2df;outline-offset:2px}
.panel{border-radius:10px;box-shadow:0 3px 15px #233d5505}.page-heading{padding:1.35rem 1.5rem;flex-wrap:wrap}.page-heading>div:first-child{min-width:0}.page-heading h1{font-size:24px;letter-spacing:-.025em}.page-heading p{font-size:14px;color:#52697d;overflow-wrap:anywhere}
.form-sections{gap:1.5rem;padding:1.5rem}.profile-edit{font-size:15px}.profile-edit>.form-sections,.profile-edit.form-sections{max-width:1120px;margin-inline:auto}.profile-edit .field-grid{gap:.25rem 1rem;padding:.75rem}.edit-field{gap:.45rem;padding:.65rem;min-width:0}.edit-field label,.edit-field .field-label,label.edit-field{font-size:14px;color:#344e63}.edit-field input,.edit-field select{min-height:42px}.edit-field textarea{min-height:100px;border-radius:7px;line-height:1.6}.edit-field input,.edit-field select,.edit-field textarea{border-color:#b9c9d6}.edit-field:has(.field-value){background:#f6f8fa;border-radius:6px}.edit-field .field-value{color:#52697d;font-size:14px}
.profile-edit fieldset,.profile-edit details,.form-block{min-width:0;border:1px solid var(--border);border-radius:9px;margin:0}.profile-edit fieldset{padding:1rem}.profile-edit legend{padding:0 .5rem;font-weight:600;color:#294e6b}.profile-edit summary,.form-block h2{background:#f7f9fb;padding:1rem 1.25rem;font-size:15px;color:#294e6b}.profile-edit summary{border-bottom:1px solid transparent}.profile-edit details[open]>summary{border-bottom-color:var(--border)}.profile-edit summary:hover{background:#edf3f8}.section-hint{color:#52697d;font-size:13px;margin:1rem 1.4rem 0;max-width:65ch}.field-hint{font-size:12px;color:#52697d}.field-required{color:#52697d;font-size:12px;font-weight:400;margin-inline-start:.4rem}.field-wide{grid-column:1/-1}.field-error{font-size:13px;color:#9b3039;overflow-wrap:anywhere}.edit-field [aria-invalid=true]{border:2px solid #b83e48;background:#fffafa}.form-feedback{padding:1rem 1.25rem;background:#fff5f4;border:1px solid #ecc7c5;border-radius:8px;margin:1rem 1.5rem}.form-feedback p{margin:0;font-weight:600}.form-feedback ul{margin:.5rem 0 0;padding-left:1.3rem}.form-feedback a{color:#92313a;text-decoration:underline}
.people-profile>.profile-edit>.form-sections{max-width:1200px}.people-profile .profile-edit .photo-panel{display:flex;align-items:center;gap:1rem;margin:1rem 1.4rem 0;padding:0}.people-profile .photo-panel .card-photo{max-height:96px;width:auto}.people-profile .field-grid{align-items:start}.people-profile .form-block[data-profile-section="Record history"]{background:#f8fafb}.people-profile .form-block[data-profile-section="Record history"] .field-grid{padding-block:.25rem}.people-profile .person-tabs{padding-inline:1rem;background:#fafbfd}.person-tabs button,.person-tabs a{font-size:14px}.profile-save-bar{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;background:#fffffff5;border-top:1px solid var(--border);box-shadow:0 -4px 14px #253f5710}.profile-save-bar p{margin:0;color:#52697d;font-size:13px}.profile-save-bar [data-dirty-state]{color:#885b14;font-weight:600}.profile-save-bar button{min-height:44px}
.notice{line-height:1.6;border-radius:7px}.notice[role=alert]{border-inline-start:4px solid #b86632;background:#fff9f0;color:#704c26}.notice[role=status]{border:2px solid #22c55e;border-inline-start-width:6px;background:#bbf7d0;color:#14532d;font-weight:700}.danger,button.primary.danger{background:#98343c;border-color:#98343c;color:white}.danger:hover,button.primary.danger:hover{background:#7e2930;color:white}a.danger-link{color:#98343c;border-color:#d8b7ba}
.login-card{border-radius:12px;max-width:440px}.login-card input{min-height:44px}.login-card label{color:#344e63;font-size:14px}.login-card .notice{margin-inline:0}table{font-size:13px}.toolbar{gap:.65rem}.toolbar label{min-width:0}.table-scroll{overscroll-behavior-inline:contain}.app-header nav .menu{max-height:70dvh;overflow:auto}.skip-link{position:absolute;top:.5rem;left:1rem;z-index:100;background:#fff;padding:.7rem 1rem;border-radius:7px;transform:translateY(-200%)}.skip-link:focus{transform:none}#main-content:focus{outline:none}
@media(min-width:1100px){.people-profile .profile-edit .form-sections{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.people-profile .profile-edit .form-sections>details{grid-column:1/-1}.people-profile .profile-edit .form-sections>details[data-profile-section="Home Address"],.people-profile .profile-edit .form-sections>details[data-profile-section="Work Address"]{grid-column:auto}.people-profile .profile-edit .form-sections>details[data-profile-section="Home Address"] .field-grid,.people-profile .profile-edit .form-sections>details[data-profile-section="Work Address"] .field-grid{grid-template-columns:1fr}.people-profile .profile-edit .form-sections>section{grid-column:1/-1}}
@media(max-width:760px){.page-heading{padding:1rem}.page-heading h1{font-size:21px}.page-heading .profile-actions{gap:.4rem}.form-sections{padding:1rem;gap:1rem}.profile-edit .field-grid{padding:.5rem;gap:0}.edit-field{padding:.6rem}.profile-edit summary,.form-block h2{padding:.85rem 1rem}.profile-edit input,.profile-edit select,.profile-edit textarea,.login-card input{font-size:16px}.profile-save-bar{padding:.75rem;gap:.6rem;flex-wrap:wrap}.profile-save-bar p{flex:1 1 100%}.profile-save-bar .profile-actions{width:100%}.profile-save-bar .profile-actions>*{flex:1}.form-feedback{margin:1rem}.field dd{font-size:14px}.app-header nav{overflow:visible;flex-wrap:wrap}.app-header .menu{position:fixed;top:auto;left:1rem;right:1rem;min-width:0;width:auto;max-width:calc(100vw - 2rem)}.grid-pagination button,.grid-pagination .button{min-height:38px}.section-hint{margin:1rem 1rem 0}.people-profile .profile-edit .photo-panel{margin-inline:1rem}.login-card{padding:1.5rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
/* Profile cards use space according to their content, with matching view/edit widths. */
.people-profile{overflow:clip}.people-profile>.form-sections{max-width:1200px;margin-inline:auto}.people-profile .form-block>.field-grid{padding:.75rem}.people-profile .field{grid-template-columns:1fr;gap:.25rem;padding:.75rem}.people-profile .field dt{font-size:13px}.people-profile .field dd:empty::before{content:"—";color:#718496}
@media(min-width:1100px){.people-profile .profile-edit .form-sections>details[data-profile-section="Name"],.people-profile .profile-edit .form-sections>details[data-profile-section="Contact Details"],.people-profile .profile-edit .form-sections>details[data-profile-section="Foundation Details"],.people-profile .profile-edit .form-sections>details[data-profile-section="Checks"]{grid-column:auto}}
.branch-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.5rem;max-height:15rem;overflow:auto;border:1px solid #b9c9d6;border-radius:7px;padding:.7rem}.branch-choices label{display:flex;align-items:center;gap:.5rem;padding:.2rem}.branch-choices input[type=checkbox]{width:18px;min-height:18px;flex:none}.secondary-branches{grid-column:1/-1}.secondary-branches legend{font-size:14px;font-weight:400}.profile-edit fieldset.secondary-branches{margin:.65rem;padding:.75rem}
.people-profile .form-block>summary{background:#f7f9fb;padding:1rem 1.25rem;color:#294e6b;font-size:15px;font-weight:600;border-bottom:1px solid transparent;cursor:pointer}.people-profile .form-block[open]>summary{border-bottom-color:var(--border)}.people-profile .form-block>summary:hover{background:#edf3f8}.profile-context{margin:.75rem 1.5rem 0;font-size:13px;color:#52697d}.document-row-actions{flex-wrap:nowrap}.document-row-actions .danger-link{color:#98343c;border-color:#d8b7ba}.profile-edit>.edit-field{max-width:65ch}.profile-edit.form-sections>.edit-field{max-width:none}
@media(max-width:760px){.profile-context{margin:.75rem 1rem 0;font-size:12px}.people-profile .page-heading button[form=profile-edit]{display:none}.people-profile .form-block>summary{padding:.85rem 1rem}.profile-edit:has(>.field-grid){padding-inline:1rem}.grid-dialog input,.grid-dialog select,.grid-search input{font-size:16px}.document-row-actions{gap:.4rem}}
.profile-edit .field-grid>.edit-field:has(textarea){grid-column:1/-1}.account-choices p,.account-choices ul{margin:0}.account-choices ul{list-style:none;padding:0;display:grid;gap:.6rem}.account-choices li{border:1px solid var(--border);border-radius:7px;padding:.8rem 1rem;max-width:38rem}.account-choices li a{font-weight:600}.profile-edit fieldset>label:not(.edit-field){display:flex;align-items:center;gap:.6rem;margin:.5rem 0}.profile-edit fieldset>label input[type=radio]{flex:none}.profile-edit fieldset .field-grid>label:not(.edit-field){display:flex;align-items:center;gap:.5rem;padding:.5rem;cursor:pointer}.profile-edit fieldset .field-grid input[type=checkbox]{width:18px;height:18px;accent-color:var(--blue)}.profile-edit .photo-remove input[type=checkbox]{width:18px;min-height:18px;flex:none}.profile-edit .photo-remove{display:flex;align-items:center;gap:.5rem}.document-row-actions .button{min-height:36px}
.row-open{font-size:13px;line-height:1.5;display:inline-flex;align-items:center;justify-content:center;min-height:32px;min-width:38px;padding:.25rem .35rem;border-radius:5px}.row-open:hover{background:#dae9f6;text-decoration:none}
.people-profile>.form-sections .photo-panel{margin:1rem 1.4rem 0;padding:0}.people-profile>.form-sections .photo-panel .card-photo{max-height:96px;width:auto}
@media(min-width:1100px){.people-profile>.form-sections{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.people-profile>.form-sections>*{grid-column:1/-1}.people-profile>.form-sections>details:is([data-profile-section="Name"],[data-profile-section="Contact Details"],[data-profile-section="Foundation Details"],[data-profile-section="Checks"],[data-profile-section="Home Address"],[data-profile-section="Work Address"]){grid-column:auto}}
.date-review>.form-sections{max-width:1120px;margin-inline:auto}.date-review>.form-sections>.section-hint{margin:0}.date-review .field{grid-template-columns:1fr;gap:.3rem}.date-review .date-confirm{padding-bottom:1rem}
/* Keep navigation and the main grid within tablet widths. */
body{grid-template-columns:minmax(0,1fr)}#main-content{min-width:0}.app-header{min-width:0}
@media(max-width:1100px){.app-header{height:auto;min-height:64px;flex-wrap:wrap;padding:.6rem 1rem;gap:.5rem}.app-header nav{order:3;width:100%;height:auto;flex-wrap:wrap;position:relative}.app-header nav>a,.app-header nav summary{padding:.5rem .7rem}.app-header nav details{position:static}.app-header nav .menu{position:absolute;top:100%;left:0;right:0;min-width:0;width:auto;max-width:100%}}
.profile-edit fieldset[aria-invalid=true]{border:2px solid #b83e48}
.account .language-button{min-height:36px;padding:.35rem .65rem;border-color:#7695af;background:transparent;color:#fff;font-size:12px;gap:.3rem}.account .language-button:hover{background:#ffffff18;color:#fff}.people-profile .profile-photo{display:flex;flex-direction:column!important;align-items:flex-start!important;gap:.3rem!important}.photo-change-link{font-size:12px;line-height:1.5;text-decoration:underline;text-underline-offset:3px;padding:.2rem 0}.profile-editor-dialog{padding:0;border:1px solid var(--border);border-radius:12px;width:min(960px,calc(100vw - 3rem));height:min(88dvh,900px);max-width:calc(100vw - 3rem);max-height:calc(100dvh - 3rem);color:#263b4d;background:white;box-shadow:0 18px 75px #17354e40}.profile-editor-dialog[open]{display:flex;flex-direction:column}.profile-editor-dialog::backdrop{background:#17354e77}.profile-editor-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.25rem;border-bottom:1px solid var(--border);flex:none}.profile-editor-dialog h2{font-size:20px;margin:0;line-height:1.4}.profile-editor-dialog>iframe{border:0;width:100%;min-height:0;flex:1;background:white}.profile-editor-status{margin:0;padding:.4rem 1.25rem;color:#52697d;font-size:13px}.profile-editor-page body{display:block;height:100dvh;background:white}.profile-editor-page .app-header,.profile-editor-page .app-footer,.profile-editor-page .skip-link{display:none}.profile-editor-page #main-content{height:100%;padding:0;scrollbar-gutter:auto}.profile-editor-page .panel{border:0;border-radius:0;box-shadow:none}.profile-editor-page .page-heading h1{display:none}.profile-editor-page .page-heading{padding:.75rem 1.25rem;background:#f8fafc}.profile-editor-page .form-sections{padding:1.25rem}.profile-editor-page .form-feedback{margin:1rem}.profile-editor-page .profile-edit{font-size:15px}.profile-editor-page .notice{margin:1rem}
@media(max-width:760px){.profile-editor-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.profile-editor-dialog>header{padding:.8rem 1rem}.profile-editor-dialog h2{font-size:19px}.profile-editor-page .form-sections{padding:1rem}.account .language-button{font-size:11px;padding:.3rem .5rem}}
.profile-editor-dialog[data-editor-kind=photo]{height:min(560px,88dvh)}.profile-editor-dialog[data-editor-kind=followers]{height:min(720px,88dvh)}
@media(max-width:760px){.profile-editor-dialog[data-editor-kind]{height:100dvh}}
/* Document tabs are the main content of their screen, so use the whole page. */
.people-profile>.form-sections[data-profile-panel="documents"],.people-profile>.form-sections[data-profile-panel="work-reports"]{max-width:none;width:100%;padding:1rem}.person-documents td:first-child{white-space:normal;overflow-wrap:anywhere;min-width:16rem;max-width:42rem}.person-documents td:first-child a{white-space:normal;overflow-wrap:anywhere}.person-documents .document-row-actions{flex-wrap:nowrap}.person-documents:has(.document-row-actions) th:last-child,.person-documents td:last-child:has(.document-row-actions){min-width:15rem}.person-documents .child-window{max-width:calc(100% - 1.6rem);margin:.8rem}
/* Keep document uploads in one narrow, aligned column at every screen size. */
.document-upload-panel{width:100%;max-width:680px;margin-inline:auto}.document-upload-panel>.upload-intro{margin:1rem 1.5rem}.document-upload-panel>.notice{margin:1rem 1.5rem}.document-upload-panel [data-document-upload]{width:100%;gap:1.25rem}.document-upload-panel .section-hint{margin:0}.document-upload-panel .field-grid{grid-template-columns:minmax(0,1fr);padding:0;gap:1.25rem}.document-upload-panel .edit-field{padding:0}.document-upload-panel .upload-drop{padding:.85rem}.document-upload-panel #type-guidance:empty{display:none}.document-upload-panel .upload-results:empty{display:none}
@media(max-width:760px){.document-upload-panel>.upload-intro,.document-upload-panel>.notice{margin:1rem}}
