:root{font-family:Inter,'Segoe UI',Arial,sans-serif;color:#112a52;background:#f3f7fc}*{box-sizing:border-box}body{margin:0}.masthead{background:linear-gradient(111deg,#07477f 0%,#1265af 65%,#fff 65.2%);display:flex;justify-content:space-between;align-items:center;min-height:166px;gap:24px;padding:22px max(28px,3vw);color:#fff}.brand-area{max-width:68%}.eyebrow{letter-spacing:.14em;font-size:11px;font-weight:800;opacity:.9}h1{font-size:clamp(22px,2.1vw,36px);margin:9px 0 5px;line-height:1.16}.masthead p{margin:0;font-size:clamp(15px,1.55vw,24px)}.logos{width:clamp(240px,31vw,460px);height:115px;object-fit:contain}main{padding:24px max(18px,2vw);max-width:1920px;margin:auto}.utility,.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.utility{justify-content:space-between}.date{background:#e2efff;padding:13px 18px;border-radius:40px;font-weight:800}.actions label{font-weight:700}button,select{font:inherit;border-radius:8px;background:#fff;border:1px solid #cad8ec;color:#173e76;padding:10px 13px;cursor:pointer}button:hover{background:#e8f2ff}.notice{font-size:13px;color:#5c6c81;margin:12px 4px 20px}.cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.card,.panel{background:#fff;border:1px solid #d9e4f3;border-radius:14px;box-shadow:0 2px 11px #153d6510}.card{padding:17px;min-width:0;border-top:5px solid var(--color)}.card-head{display:flex;align-items:center;gap:10px;min-height:42px}.ico{background:var(--tint);border-radius:50%;width:42px;height:42px;display:grid;place-items:center;color:var(--color);font-size:24px}.card h3{margin:0;font-size:13px;text-transform:uppercase}.figures{display:grid;grid-template-columns:1fr 1fr;gap:5px;text-align:center;margin:15px 0}.figures strong{display:block;font-size:30px;color:#0c2f68}.figures small{font-size:12px;color:#667b95}.card .money{background:var(--tint);border-radius:9px;padding:10px 5px;text-align:center;font-size:20px;font-weight:850}.card .money small{display:block;font-size:11px;font-weight:500;margin-top:4px}.charts{display:grid;grid-template-columns:1.2fr 1fr .75fr;gap:14px;margin-top:15px}.panel{padding:20px;min-width:0}.panel h2{font-size:17px;color:#103c7d;margin:0 0 20px}.barline{display:grid;grid-template-columns:110px 1fr 68px;align-items:center;gap:10px;margin:17px 0;font-size:12px}.track{height:21px;border-radius:6px;background:#ecf2fa;overflow:hidden;position:relative}.fill{height:100%;background:var(--color);border-radius:6px}.barline b{text-align:right}.legend{display:flex;gap:14px;font-size:12px;margin:4px 0 14px}.swatch{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px}.amount{display:flex;flex-direction:column;justify-content:center;gap:5px;background:linear-gradient(135deg,#fff,#ebf3ff)}.amount strong{font-size:clamp(22px,2.4vw,37px);color:#1554a4;margin-bottom:15px}.amount .label{font-size:13px;color:#6b7f98}.small{font-size:12px;color:#738298;line-height:1.5}.table-panel{margin-top:16px}.scroll{overflow:auto}table{border-collapse:collapse;width:100%;min-width:1080px;font-size:12px;text-align:center}th,td{padding:10px 7px;border:1px solid #dbe5ef}th{background:#e9f1fd;color:#163d79}thead tr:first-child th{background:#d6e9ff}td:first-child,th:first-child{text-align:left;min-width:165px}tbody tr:nth-child(even){background:#f8fbff}tbody tr:last-child.total{background:#dceeff;font-weight:800}footer{display:flex;justify-content:space-between;gap:20px;color:#657b99;font-size:12px;padding:25px 3px}@media(max-width:1100px){.cards{grid-template-columns:repeat(3,1fr)}.charts{grid-template-columns:1fr 1fr}.amount{grid-column:1/-1}}@media(max-width:680px){.masthead{background:#105399;display:block}.brand-area{max-width:none}.logos{background:#fff;padding:10px;width:100%;height:115px;border-radius:9px;margin-top:17px}.cards{grid-template-columns:1fr 1fr}.charts{grid-template-columns:1fr}.amount{grid-column:auto}.barline{grid-template-columns:90px 1fr 50px}.utility{align-items:start}.actions{width:100%}.cards .card:last-child{grid-column:1/-1}footer{display:block}}
@media print{body{background:#fff}.actions{display:none}.panel,.card{box-shadow:none;break-inside:avoid}.masthead{print-color-adjust:exact}.cards{grid-template-columns:repeat(5,1fr)}.charts{grid-template-columns:1fr 1fr 1fr}}
.amount strong small{display:block;font-size:13px;font-weight:700;color:#607996;margin-top:5px}td small{display:block;color:#63768e;margin-top:3px}.php{font-weight:800;color:#123f7d}
.logos{width:clamp(320px,35vw,560px);height:138px}
@media(max-width:680px){.logos{width:100%;height:125px}}
.report-preview{margin-top:16px}.report-page{background:#f8fbff;border:1px solid #d6e4f5;border-radius:14px;overflow:hidden;box-shadow:0 2px 11px #153d6510}.report-head{display:flex;justify-content:space-between;align-items:center;gap:24px;background:linear-gradient(112deg,#075091 0%,#1274bd 64%,#fff 64.2%);color:#fff;padding:22px 28px}.report-head h2{font-size:clamp(24px,2.4vw,42px);line-height:1.08;margin:0}.report-head p{font-size:clamp(16px,1.5vw,26px);margin:6px 0 0}.report-head img{width:clamp(310px,30vw,520px);height:118px;object-fit:contain}.report-meta{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 28px 8px}.report-date{background:#e3f0ff;border-radius:14px;color:#0a3674;font-size:22px;font-weight:850;padding:12px 22px}.report-meta p{font-size:18px;line-height:1.25;color:#111;margin:0}.preview-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding:12px 28px 20px}.preview-cards article{background:var(--tint);border:1px solid #eef4fb;border-radius:8px;padding:18px;text-align:center;color:#061a61}.preview-icon{background:var(--color);border-radius:50%;color:#fff;display:grid;font-size:30px;height:72px;margin:0 auto 8px;place-items:center;width:72px}.preview-cards h3{font-size:14px;margin:0 0 8px;text-transform:uppercase}.preview-cards strong{display:block;font-size:42px;line-height:1}.preview-cards p{font-size:15px;margin:6px 0 12px}.preview-cards div:not(.preview-icon){background:#ffffff60;border-radius:8px;font-size:22px;font-weight:850;margin-top:5px;padding:9px}.preview-cards small{display:block;font-size:13px;font-weight:600;margin-top:3px}.preview-grid{display:grid;grid-template-columns:1.05fr .8fr .8fr;gap:14px;padding:0 28px 26px}.preview-grid article{background:#fff;border:1px solid #d9e4f3;border-radius:8px;padding:18px}.preview-grid h3{color:#061a61;font-size:23px;margin:0 0 14px}.preview-bars{display:grid;grid-template-columns:repeat(5,1fr);align-items:end;gap:14px;height:245px;border-bottom:1px solid #cdd9e8;padding-top:26px}.preview-bar{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:end;text-align:center}.preview-bar b{color:#061a61;font-size:22px;margin-bottom:6px}.preview-bar span{background:var(--color);border-radius:4px 4px 0 0;display:block;max-width:88px;min-height:8px;width:100%}.preview-bar em{font-style:normal;font-weight:700;line-height:1.15;margin-top:8px}.donut-wrap{align-items:center;display:grid;grid-template-columns:210px 1fr;gap:18px}.donut{align-items:center;border-radius:50%;display:grid;height:210px;justify-items:center;position:relative;width:210px}.donut:after{background:#fff;border-radius:50%;content:"";height:112px;position:absolute;width:112px}.donut span{color:#061a61;font-size:15px;line-height:1.25;position:relative;text-align:center;z-index:1}.donut b{font-size:24px}.report-legend p{align-items:center;color:#061a61;display:grid;font-size:14px;font-weight:700;gap:8px;grid-template-columns:14px 1fr auto;margin:10px 0}.report-legend i{border-radius:50%;height:14px;width:14px}.report-page footer{background:linear-gradient(90deg,#d9ecff,#add2e8);color:#183765;font-size:14px;padding:22px 28px}.report-page footer span{margin-left:22px}@media(max-width:1200px){.preview-cards{grid-template-columns:repeat(3,1fr)}.preview-grid{grid-template-columns:1fr}.donut-wrap{grid-template-columns:240px 1fr}.donut{height:240px;width:240px}}@media(max-width:760px){.report-head,.report-meta{display:block}.report-head{background:#105399}.report-head img{background:#fff;border-radius:8px;height:110px;margin-top:16px;padding:8px;width:100%}.report-meta p{font-size:15px;margin-top:12px}.preview-cards{grid-template-columns:1fr;padding:12px}.preview-grid{padding:0 12px 16px}.donut-wrap{grid-template-columns:1fr}.donut{height:220px;margin:auto;width:220px}.report-page footer span{display:block;margin:8px 0 0}}
.import-status{color:#476783;font-size:12px;font-weight:700;min-height:18px}.import-status.ok{color:#116b37}.import-status.error{color:#b3263f}
.detail-links{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 18px}.detail-links a,.detail-link{background:#fff;border:1px solid #cad8ec;border-radius:8px;color:#1554a4;display:inline-block;font-size:13px;font-weight:800;padding:9px 12px;text-decoration:none}.detail-links a:hover,.detail-link:hover{background:#e8f2ff}.amount .detail-link{font-size:12px;margin:-8px 0 10px;padding:7px 10px;width:max-content}.amount strong .detail-link{display:block;margin-top:8px}
.sheet-url{font:inherit;border-radius:8px;background:#fff;border:1px solid #cad8ec;color:#173e76;min-height:44px;min-width:260px;padding:10px 13px}
.profile-page .table-panel table{min-width:980px}.profile-page .profile-head{background:linear-gradient(111deg,#07375f 0%,#1355a2 65%,#fff 65.2%)}.profile-page td:nth-child(2),.profile-page td:nth-child(6),.profile-page td:nth-child(7){text-align:left}.profile-page .notice{background:#fff8dc;border:1px solid #eadb9b;border-radius:8px;color:#674b00;padding:12px 14px}
.profile-login-page{min-height:100vh;background:linear-gradient(112deg,#07477f 0%,#1265af 58%,transparent 58.2%),linear-gradient(180deg,#f8fbff 0%,#e6f1fb 100%)}.profile-shell{max-width:none;min-height:100vh;padding:24px;display:grid;place-items:center}.profile-login-card{background:#fff;border:1px solid #d6e4f5;border-radius:14px;box-shadow:0 18px 50px #092c5a2a;padding:26px;width:min(100%,440px)}.profile-login-card .logo-panel{display:grid;place-items:center;background:#fff;border:1px solid #dce8f6;border-radius:10px;margin-bottom:18px;padding:14px}.profile-login-card .logo-panel img{width:100%;max-width:330px;height:86px;object-fit:contain}.profile-login-card .eyebrow{color:#1d66ad;font-size:12px;font-weight:850;letter-spacing:.12em;text-transform:uppercase;margin:0 0 8px}.profile-login-card h1{font-size:25px;line-height:1.18;margin:0;color:#082f6f}.profile-login-card .sub{color:#607996;font-size:14px;line-height:1.45;margin:9px 0 22px}.profile-login-card label{display:block;color:#163d79;font-size:13px;font-weight:800;margin:0 0 7px}.profile-login-card input{width:100%;min-height:46px;border:1px solid #c7d8ec;border-radius:8px;color:#08285a;font:inherit;margin-bottom:14px;padding:10px 12px}.profile-login-card input:focus{border-color:#287de0;box-shadow:0 0 0 3px #287de024;outline:0}.profile-login-card button{width:100%;min-height:48px;border:0;border-radius:8px;background:#155aa6;color:#fff;cursor:pointer;font:inherit;font-weight:850;margin-top:2px}.profile-login-card .note{background:#fff8dc;border:1px solid #eadb9b;border-radius:8px;color:#674b00;font-size:12px;line-height:1.45;margin:16px 0 0;padding:11px 12px}.profile-app{width:100%;max-width:1920px}.profile-app .table-panel table{min-width:980px}.profile-app td:nth-child(2),.profile-app td:nth-child(6),.profile-app td:nth-child(7){text-align:left}.profile-app .notice{background:#fff8dc;border:1px solid #eadb9b;border-radius:8px;color:#674b00;padding:12px 14px}@media(max-width:560px){.profile-shell{align-items:start;padding:18px 12px}.profile-login-card{padding:20px}.profile-login-card h1{font-size:22px}.profile-login-card .logo-panel img{height:78px}}
.password-wrap{position:relative}.profile-login-card .password-wrap input{padding-right:52px}.profile-login-card .password-toggle{align-items:center;background:transparent;border:0;color:#155aa6;display:grid;height:42px;justify-items:center;margin:0;min-height:42px;padding:0;position:absolute;right:4px;top:2px;width:42px}.password-toggle svg{fill:currentColor;grid-area:1/1;height:22px;width:22px}.password-toggle .icon-eye-off{display:none}.password-toggle.is-visible .icon-eye{display:none}.password-toggle.is-visible .icon-eye-off{display:block}.password-toggle.is-visible{color:#0b315f}
.auth-locked #dashboardApp,.auth-unlocked #dashboardLogin{display:none!important}.auth-unlocked #dashboardApp{display:block!important}
.masthead-actions{align-items:center;display:flex;flex-direction:column;gap:10px}.logout-button{background:#fff;border:1px solid #c8dbf2;border-radius:8px;color:#0d4f95;font-weight:850;min-height:38px;padding:8px 16px}.logout-button:hover{background:#e8f2ff}@media(max-width:680px){.masthead-actions{align-items:stretch}.logout-button{width:100%}}
.profile-login-card .note{display:none!important}
.figure-link,.summary-figure-link{border-radius:8px;color:inherit;display:block;padding:4px;text-decoration:none}.figure-link:hover,.summary-figure-link:hover{background:#ffffff80;outline:2px solid #d1e3f7}.money-link{color:#082f6f;display:block;text-decoration:none}.money-link:hover{filter:brightness(.98);outline:2px solid #d1e3f7}.summary-figure-link small{display:block;font-size:13px;font-weight:700;color:#607996;margin-top:5px}
.donut .amount-total{align-items:center;display:flex;flex-direction:column;gap:2px;max-width:96px}.donut .amount-total em{font-style:normal;font-size:13px}.donut .amount-total b{font-size:16px;line-height:1.1;white-space:normal}.donut .amount-total small{font-size:11px;line-height:1.15}
.profile-table-head{align-items:center;display:flex;gap:16px;justify-content:space-between;margin-bottom:18px}.profile-table-head h2{margin:0}.profile-filters{align-items:end;display:flex;flex-wrap:wrap;gap:8px}.profile-filters label{color:#163d79;font-size:12px;font-weight:800}.profile-filters select{min-width:210px}@media(max-width:760px){.profile-table-head{align-items:stretch;display:block}.profile-filters{display:grid;grid-template-columns:1fr;gap:7px;margin-top:12px}.profile-filters select{width:100%;min-width:0}}


/* Mobile-first refinements: UPLIFT dashboard, 2026-10-12 */
html{overflow-x:clip}body{min-width:0}img{max-width:100%}
.card .money,.amount strong,.preview-cards div:not(.preview-icon){overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
button,select{min-height:44px}
.scroll{-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
@media(max-width:760px){
  main{padding:14px 12px 28px}
  .masthead{padding:21px 16px 16px;min-height:0;display:flex;flex-direction:column;align-items:stretch;gap:12px}
  .masthead h1{font-size:clamp(23px,6vw,30px);line-height:1.16}
  .masthead p{font-size:15px}
  .eyebrow{font-size:10px;letter-spacing:.07em}
  .logos{width:100%;max-width:480px;height:auto;max-height:130px;object-fit:contain;margin:0 auto;padding:9px;background:#fff}
  .utility{flex-direction:column;align-items:stretch;gap:12px}
  .date{width:fit-content;max-width:100%;padding:10px 14px;font-size:14px}
  .actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:stretch}
  .actions label{grid-column:1/-1}
  .actions select,.sheet-url{grid-column:1/-1;min-width:0;width:100%}
  .actions button{white-space:normal;font-size:13px;padding:10px 7px}
  .actions button:last-of-type{grid-column:1/-1}
  .notice{font-size:12px;line-height:1.5;margin:12px 2px 15px}
  .cards{grid-template-columns:1fr;gap:11px}
  .cards .card:last-child{grid-column:auto}
  .card{padding:14px}
  .card-head{min-height:38px}
  .figures{margin:11px 0}
  .figures strong{font-size:27px}
  .card .money{font-size:clamp(18px,5.5vw,24px);padding:12px 7px}
  .charts{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:12px}
  .panel{padding:15px;border-radius:12px}
  .panel h2{font-size:17px;margin-bottom:15px}
  .barline{grid-template-columns:80px minmax(0,1fr) 43px;gap:6px;font-size:11px}
  .amount{grid-column:auto}
  .amount strong{font-size:clamp(22px,7vw,31px)}
  .report-preview{margin-top:12px}
  .report-head{padding:16px}
  .report-head h2{font-size:clamp(21px,5.5vw,27px)}
  .report-head p{font-size:14px}
  .report-head img{height:auto;max-height:125px;object-fit:contain}
  .report-meta{padding:14px 13px 5px}
  .report-date{font-size:15px;padding:9px 12px}
  .report-meta p{font-size:12px;line-height:1.5}
  .preview-cards{grid-template-columns:1fr;gap:9px;padding:11px}
  .preview-cards article{padding:13px}
  .preview-icon{width:46px;height:46px;font-size:21px}
  .preview-cards strong{font-size:30px}
  .preview-cards h3{font-size:13px}
  .preview-cards div:not(.preview-icon){font-size:clamp(18px,5vw,23px)}
  .preview-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:0 11px 14px}
  .preview-grid article{min-width:0;padding:12px;overflow:hidden}
  .preview-grid h3{font-size:17px}
  .preview-bars{gap:4px;height:185px;padding-top:14px}
  .preview-bar b{font-size:13px}
  .preview-bar em{font-size:9px;overflow-wrap:anywhere}
  .donut-wrap{grid-template-columns:minmax(0,1fr);gap:10px}
  .donut{width:min(190px,65vw);height:min(190px,65vw)}
  .donut:after{height:55%;width:55%}
  .donut span{font-size:12px}
  .donut b{font-size:17px}
  .report-legend p{font-size:12px;grid-template-columns:12px minmax(0,1fr) auto}
  .report-legend i{height:11px;width:11px}
  .report-page footer{padding:14px;font-size:11px}
  .table-panel{margin-top:12px}
  .table-panel .scroll{max-width:100%;overflow-x:auto;border:1px solid #dbe5ef;border-radius:8px}
  .table-panel table{width:max-content;min-width:1080px}
  td,th{padding:9px 7px}
  footer{line-height:1.6}
}
@media(min-width:481px) and (max-width:760px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cards .card:last-child{grid-column:1/-1}}
@media print{html{overflow:visible}.scroll{overflow:visible}.table-panel table{width:100%}}
.nav-button{background:#fff;border:1px solid #cad8ec;border-radius:8px;color:#173e76;cursor:pointer;display:inline-block;font:inherit;font-weight:800;min-height:44px;padding:10px 13px;text-decoration:none}.nav-button:hover{background:#e8f2ff}

.sync-status { overflow-wrap:anywhere; }
.sync-error { background:#fff0ec; color:#8c2613; }
.profile-filters input { padding:10px; border:1px solid #b8c9db; border-radius:6px; max-width:100%; }
.profile-page td { white-space:pre-wrap; min-width:90px; max-width:380px; overflow-wrap:anywhere; }
.profile-page main { min-width:0; }
.profile-page .table-panel { min-width:0; max-width:100%; }
.profile-page .scroll { max-width:100%; overflow:auto; }
dialog { border:1px solid #bfd1e3; border-radius:12px; padding:24px; width:min(650px,90vw); max-height:85vh; overflow:auto; }
dialog::backdrop { background:#001a3b99; }
dialog dt { font-weight:700; margin-top:15px; }
dialog dd { margin:4px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px) { .profile-filters { display:flex; flex-direction:column; align-items:stretch; width:100%; } .profile-table-head { display:block; } .profile-head { display:flex; flex-direction:column; } }
.profile-dialog-controls { display:flex; justify-content:flex-end; position:sticky; top:-24px; background:#fff; padding:8px 0; z-index:1; }
.profile-dialog-controls + h2 { margin-top:8px; }

.preview-cards div.preview-php { font-size:clamp(24px,2vw,30px); font-weight:850; }
.preview-cards div.preview-sar { font-size:18px; font-weight:600; color:#45617e; }

.assistance-icon { display:block; width:24px; height:24px; flex-shrink:0; }
.card .ico { display:grid; place-items:center; }
.preview-icon .assistance-icon { width:34px; height:34px; }
@media(max-width:600px) { .preview-icon .assistance-icon { width:30px; height:30px; } }

.preview-cards article { container-type:inline-size; }
.preview-cards div.preview-php { font-size:clamp(20px,11cqw,28px); overflow-wrap:normal; }
.preview-cards div.preview-sar { overflow-wrap:normal; }

/* Keep the full report title on blue and give the official logo its own space. */
.report-head { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr); gap:0; padding:0; align-items:stretch; background:#fff; min-height:210px; }
.report-head > div { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:32px 38px; background:linear-gradient(110deg,#075091,#1274bd); }
.report-head h2 { font-size:clamp(28px,2.4vw,42px); line-height:1.18; overflow-wrap:normal; }
.report-head p { line-height:1.4; margin-top:12px; }
.report-head img { width:100%; max-width:none; height:210px; min-width:0; padding:20px 24px; box-sizing:border-box; object-fit:contain; align-self:center; }
@media(max-width:900px) { .report-head { grid-template-columns:1fr; } .report-head > div { padding:26px 24px; } .report-head img { height:180px; margin:0; border-radius:0; padding:18px 24px; } }
@media(max-width:480px) { .report-head > div { padding:24px 20px; } .report-head h2 { font-size:27px; } .report-head img { height:150px; } }
.matrix-panels { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); grid-template-areas:'casualties names' 'passengers names' 'assistance names'; gap:20px; align-items:start; }
.matrix-panels[hidden],#recordTableWrap[hidden] { display:none; }
.matrix-panel { min-width:0; border:1px solid #d5e1ed; border-radius:12px; overflow:hidden; background:#fff; box-shadow:0 3px 12px #123b6010; }
.matrix-panel > header { background:#f1f6fc; padding:18px 20px; border-bottom:1px solid #d5e1ed; }
.matrix-panel h3 { margin:0; color:#0c3659; font-size:20px; }
.matrix-panel header p { margin:5px 0 0; font-size:13px; color:#526a80; }
.matrix-casualties { grid-area:casualties; } .matrix-names { grid-area:names; } .matrix-passengers { grid-area:passengers; } .matrix-assistance { grid-area:assistance; }
.matrix-table-scroll { overflow:auto; max-width:100%; }
.matrix-panel table { width:100%; border-collapse:collapse; min-width:560px; }
.matrix-names table { min-width:850px; }
.matrix-panel thead th { background:#0c3659; color:white; text-align:center; padding:12px 10px; font-size:12px; white-space:normal; border:1px solid #ffffff26; }
.matrix-panel .matrix-gold thead th { background:#f7bd13; color:#172b40; }
.matrix-panel tbody td,.matrix-panel tbody th { padding:13px 10px; border:1px solid #e0e7ee; font-size:13px; line-height:1.5; min-width:65px; white-space:pre-wrap; overflow-wrap:break-word; text-align:center; vertical-align:top; }
.matrix-panel tbody th { color:#173b5c; text-align:left; min-width:100px; background:#f5f8fc; font-weight:700; }
.matrix-names tbody td { text-align:left; min-width:140px; }
.matrix-passengers tbody td:last-child { text-align:left; min-width:170px; }
@media(max-width:1200px) { .matrix-panels { grid-template-columns:minmax(0,1fr); grid-template-areas:'casualties' 'names' 'passengers' 'assistance'; } }
@media print { .matrix-panels { display:block; } .matrix-panel { break-inside:avoid; margin-bottom:16px; } .matrix-panel table { min-width:0; } }

/* Full-width stacked matrix panels; wrap content rather than scroll sideways. */
.profile-page .matrix-panels { grid-template-columns:minmax(0,1fr); grid-template-areas:'casualties' 'names' 'passengers' 'assistance'; width:100%; }
.profile-page .matrix-panel table { width:100%; min-width:0; table-layout:fixed; }
.profile-page .matrix-panel table th,.profile-page .matrix-panel table td { min-width:0; max-width:none; white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-page .matrix-panel table thead th { background:#0c3659; color:#fff; }
.profile-page .matrix-panel table.matrix-gold thead th { background:#f7bd13; color:#172b40; }
.profile-page .matrix-table-scroll { overflow:visible; }
@media(max-width:600px) {
  .profile-page .matrix-panel table th,.profile-page .matrix-panel table td { padding:8px 4px; font-size:11px; }
  .matrix-panel > header { padding:14px; }
}
.preview-bars { height:280px; padding-top:0; align-items:stretch; gap:12px; border-bottom:0; }
.preview-bar { display:grid; grid-template-rows:minmax(0,1fr) 48px; height:100%; min-width:0; }
.preview-bar-column { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; border-bottom:1px solid #cdd9e8; }
.preview-bar-column b { flex-shrink:0; margin-bottom:7px; }
.preview-bar-column span { width:70%; max-width:70px; min-height:0; flex-shrink:0; border-radius:5px 5px 0 0; }
.preview-bar em { align-self:start; margin-top:9px; font-size:13px; overflow-wrap:normal; }
@media(max-width:480px) { .preview-bars { gap:6px; height:250px; } .preview-bar em { font-size:11px; } .preview-bar-column b { font-size:18px; } }

.profile-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-top:20px; padding-top:16px; border-top:1px solid #d5e1ed; }
.profile-pagination[hidden] { display:none; }
.pagination-buttons { display:flex; flex-wrap:wrap; gap:8px; margin-left:auto; }
.profile-pagination button:disabled { opacity:.45; cursor:not-allowed; }
.profile-pagination select { padding:9px; border:1px solid #bfd1e3; border-radius:6px; }
@media(max-width:600px) { .pagination-buttons { width:100%; margin-left:0; } .pagination-buttons button { flex:1; padding:10px 6px; } }
