/* --text: the crew app's main text colour; app.js and the Toolbox Talk styles use it (it was never defined, so titles inside buttons fell back to black). */
:root{--bg:#1a1a1a;--bg-card:#242424;--bg-input:#2a2a2a;--border:#333;--orange:#FF6B35;--orange-hover:#ff8555;--orange-dim:rgba(255,107,53,0.15);--white:#fff;--text:var(--white);--gray:#bbb;--gray-light:#ddd;--red:#ff4444;--green:#44bb44;--radius:12px;--radius-sm:8px}
/* Fix 2: Prevent iOS auto-zoom on input focus (requires 16px minimum) */
input,select,textarea{font-size:16px!important}
/* A double-tap never zooms the page: on iPhone two quick taps on a back arrow zoomed the whole store app, and it stayed zoomed. touch-action:manipulation still lets every screen scroll and, on the website, be pinch-zoomed. It is on every element because iOS starts touch-action again inside each scrolling box (the chat's messages, sheets). The drawing boxes set touch-action:none in their own rules (.signature-canvas, and the DTA sketch while Draw is on: .dta-sketch-area.drawing .dta-sketch-canvas). */
*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--white);min-height:100vh;min-height:100dvh;overflow-x:hidden}
#app{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;position:relative}
.view{display:none;min-height:100vh;min-height:100dvh;padding-bottom:40px}
.view.active{display:block;animation:fadeIn .2s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fireCallPulse{0%,100%{box-shadow:0 4px 12px rgba(255,107,0,0.4)}50%{box-shadow:0 4px 24px rgba(255,107,0,0.7),0 0 40px rgba(220,38,38,0.3)}}
.auth-container{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;min-height:100dvh;padding:24px}
.logo-section{text-align:center;margin-bottom:40px}
.auth-logo{max-width:280px;width:80%;height:auto}
.home-logo-img{max-width:220px;width:70%;height:auto}
.doc-viewer{padding:20px}
.doc-viewer img{width:100%;border-radius:var(--radius-sm);margin-bottom:12px}
/* DTA Card - exact match to BCWS FS 5026 */
.dta-form{padding:0}
.dta-card-header{padding:12px;border-bottom:2px solid var(--border)}
.dta-title-bar{display:flex;align-items:center;gap:12px;margin-bottom:12px;padding:8px 12px;background:var(--bg-card);border:1px solid var(--border);border-radius:4px}
.dta-form-id{font-size:10px;color:var(--gray);white-space:nowrap}
.dta-title{font-size:15px;font-weight:800;letter-spacing:1px;flex:1;text-align:center}
.dta-grid{display:flex;flex-wrap:wrap;border-bottom:1px solid var(--border)}
.dta-cell{padding:6px 8px;display:flex;align-items:center;gap:4px;flex-wrap:wrap;border-right:1px solid var(--border)}
.dta-cell:last-child{border-right:none}
.dta-cell input,.dta-cell select{flex:1;min-width:40px;padding:8px 6px;background:var(--bg-input);border:1px solid var(--border);border-radius:3px;color:var(--white);font-size:16px;text-align:center}
.dta-cell input:focus,.dta-cell select:focus{border-color:var(--orange);outline:none}
.dta-label{font-size:11px;color:var(--gray-light);font-weight:600;white-space:nowrap}
.dta-label-bold{font-size:12px;color:var(--gray-light);font-weight:600;margin-bottom:6px}
.dta-w20{width:20%}.dta-w25{width:25%}.dta-w30{width:30%}.dta-w40{width:40%}.dta-w50{width:50%}.dta-w60{width:60%}
@media(max-width:480px){.dta-cell{width:50%!important}.dta-cell input[type="date"]{flex-basis:100%}}

/* DTA Table */
.dta-table-wrap{overflow-x:auto;margin:0;padding:8px;-webkit-overflow-scrolling:touch}
.dta-table{border-collapse:collapse;font-size:13px;min-width:1100px}
.dta-table th,.dta-table td{border:1px solid #555;padding:4px;text-align:center}
.dta-table thead th{background:#333;color:var(--gray-light);font-weight:600}

/* Category headers */
.dta-cat-row th{padding:4px 2px;font-size:11px}
.dta-cat-blank{background:#333}
.dta-cat-low{background:#4a7a3a;color:#fff}
.dta-cat-moderate{background:#7a6a20;color:#fff}
.dta-cat-high{background:#7a2a2a;color:#fff}
.dta-cat-mgmt{background:#444;color:var(--orange)}

.dta-desc-row th{font-size:11px;font-weight:400;color:var(--gray-light);font-style:italic;padding:4px}
.dta-desc-cell{font-style:italic}

/* Vertical column headers */
.dta-col-row th{height:140px;padding:4px 1px;min-width:28px;max-width:32px;background:#2a2a2a}
.dta-vert{writing-mode:vertical-rl;transform:rotate(180deg);font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:130px}

/* Data row cells */
.dta-data-row td{padding:1px}
.dta-data-row input,.dta-data-row select{width:100%;padding:6px 2px;background:var(--bg-input);border:1px solid transparent;border-radius:2px;color:var(--white);font-size:16px;text-align:center;appearance:none;-webkit-appearance:none}
.dta-data-row input:focus,.dta-data-row select:focus{border-color:var(--orange);outline:none;background:var(--bg-card)}
.dta-data-row select{cursor:pointer}
.dta-data-row select option{background:var(--bg-card);color:var(--white)}
.dta-species-sel{min-width:60px;font-size:10px!important;text-align:center!important}
.dta-low{background:rgba(74,122,58,0.15)}
.dta-mod{background:rgba(122,106,32,0.1)}
.dta-mod-h{background:rgba(122,106,32,0.2)}
.dta-high{background:rgba(122,42,42,0.15)}
.dta-overall{background:rgba(255,107,53,0.1)}
.dta-overall-h{background:rgba(255,107,53,0.15)}
.dta-mgmt{background:rgba(255,255,255,0.05)}
.dta-mgmt-h{background:rgba(255,255,255,0.08)}

/* Comments and footer */
.dta-comments{padding:12px;border-top:2px solid var(--border)}
.dta-comments textarea{width:100%;padding:8px;background:var(--bg-input);border:1px solid var(--border);border-radius:4px;color:var(--white);font-size:13px;font-family:inherit;resize:vertical}
.dta-comments textarea:focus{border-color:var(--orange);outline:none}
.dta-footer{padding:8px 12px;border-top:1px solid var(--border)}

/* Sketch map */
.dta-sketch-section{padding:12px;border-top:2px solid var(--border)}
.dta-sketch-hint{font-size:12px;color:var(--gray);margin:4px 0;font-style:italic}
.dta-sketch-area{position:relative;border:2px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}
.dta-sketch-header{display:flex;justify-content:center;align-items:center;gap:20px;padding:6px;background:var(--bg-card);border-bottom:1px solid var(--border);font-weight:700;font-size:14px}
.dta-north{background:#333;color:#fff;padding:4px 10px;font-weight:900;font-size:16px}
.dta-sketch-canvas{width:100%;height:350px;touch-action:manipulation;display:block}
.dta-sketch-toggle{margin:4px 0 8px;touch-action:manipulation}
.dta-sketch-toggle.drawing{background:var(--orange);border-color:var(--orange);color:var(--white)}
.dta-sketch-area.drawing{border-color:var(--orange)}
.dta-sketch-area.drawing .dta-sketch-canvas{touch-action:none}

/* MER Form */
.mer-form{padding:0;font-size:13px}
.mer-title{text-align:center;font-size:16px;font-weight:800;padding:12px;color:var(--orange)}
.mer-subtitle{text-align:center;font-size:10px;color:var(--gray);padding:0 12px 8px;line-height:1.4}
.mer-callout{background:var(--bg-card);border:1px solid var(--orange);border-radius:var(--radius-sm);padding:10px 12px;margin:0 12px 12px;font-size:12px;color:var(--gray-light);line-height:1.4}
.mer-section-title{padding:6px 12px;font-weight:700;font-size:13px;margin-top:8px;color:#fff}
.mer-section-title.mer-red{background:#CC0000}
.mer-section-title.mer-orange{background:#FF6600}
.mer-section-title.mer-gold{background:#FFCC00;color:#000}
.mer-section-title.mer-green{background:#339933}
.mer-section-title.mer-gray{background:#808080}
.mer-section-title.mer-purple{background:#660099}
.mer-section-title.mer-pink{background:#FF6699;color:#000}
.mer-section-title.mer-ltorange{background:#FF9933;color:#000}
.mer-section-title.mer-ltgray{background:#CCCCCC;color:#000}
.mer-grid2{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid var(--border)}
.mer-grid3{display:grid;grid-template-columns:1fr 1fr 1fr;border-bottom:1px solid var(--border)}
.mer-grid4{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;border-bottom:1px solid var(--border)}
.mer-grid4eq{display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--border)}
@media(max-width:480px){.mer-grid3,.mer-grid4,.mer-grid4eq{grid-template-columns:1fr 1fr}.mer-grid2{grid-template-columns:1fr}}
.mer-block{border-right:1px solid var(--border);padding:8px;font-size:12px}
.mer-block:last-child{border-right:none}
.mer-block-title{font-size:11px;font-weight:700;margin-bottom:6px;padding:4px 6px;border-radius:3px;color:#fff}
.mer-block-title.mer-bt-orange{background:#FF6600}
.mer-block-title.mer-bt-gold{background:#FFCC00;color:#000}
.mer-block-title.mer-bt-green{background:#339933}
.mer-block-title.mer-bt-gray{background:#808080}
.mer-block-title.mer-bt-purple{background:#660099}
.mer-block-title.mer-bt-blue{background:#1565C0}
.mer-chk.mer-inline{display:inline-block;margin-right:6px}
.mer-dir-btns{display:inline-flex;gap:4px;vertical-align:middle}
.mer-block-title.mer-bt-pink{background:#FF6699;color:#000}
.mer-block-title.mer-bt-ltorange{background:#FF9933;color:#000}
.mer-block-title.mer-bt-red{background:#CC0000}
.mer-field{margin-bottom:4px;display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.mer-full{padding:8px 12px}
.mer-label{font-size:11px;color:var(--gray-light);font-weight:600;white-space:nowrap}
.mer-input{width:100%;padding:8px 6px;background:var(--bg-input);border:1px solid var(--border);border-radius:3px;color:var(--white);font-size:16px;font-family:inherit}
.mer-input:focus{border-color:var(--orange);outline:none}
.mer-chk{display:flex;align-items:center;gap:6px;padding:3px 0;font-size:12px;color:var(--gray-light);cursor:pointer}
.mer-chk input{width:24px;height:24px;accent-color:var(--orange);flex-shrink:0}
.mer-patient-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;padding:8px 12px;background:#CCCCCC;color:#000;font-weight:700;font-size:13px}
.mer-footer{padding:12px;border-top:2px solid var(--border)}
.mer-phones{font-size:12px;color:var(--white);text-align:center;margin-top:12px;padding:10px;background:var(--bg-card);border-radius:8px;line-height:1.6;word-break:break-all;font-weight:600}
.mer-section-bar{font-size:14px;font-weight:700;color:white;padding:10px 14px;border-radius:8px;margin:16px 0 12px;text-transform:uppercase;letter-spacing:0.5px}
.mer-bar-orange{background:#e65100}.mer-bar-blue{background:#1565c0}.mer-bar-green{background:#2e7d32}.mer-bar-red{background:#c62828}
.mer-ref-table{width:100%;border-collapse:collapse;font-size:12px;margin-bottom:16px}
.mer-ref-table th{background:var(--bg-card);color:white;padding:8px 10px;text-align:left;font-size:11px;border:1px solid var(--border)}
.mer-ref-table td{padding:6px 10px;border:1px solid var(--border);vertical-align:top;color:var(--gray-light)}
.mer-patient-bar{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;border-radius:8px;margin:12px 0;flex-wrap:wrap;gap:8px}
.mer-ltgray-bar{background:var(--bg-card);border:2px solid var(--border)}
.logo-text{font-size:36px;font-weight:800;letter-spacing:6px;color:var(--orange)}
.logo-sub{font-size:18px;font-weight:300;letter-spacing:12px;color:var(--gray-light);margin-top:4px}
.tagline{font-size:14px;color:var(--gray);margin-top:16px;font-style:italic}
.auth-form{width:100%;max-width:340px}
.auth-form h2{text-align:center;margin-bottom:20px;font-weight:600}
.auth-form input{width:100%;padding:14px 16px;margin-bottom:12px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font-size:16px;outline:none;transition:border-color .2s}
.auth-form input:focus{border-color:var(--orange)}
.auth-switch{text-align:center;margin-top:16px;color:var(--gray);font-size:14px}
.auth-switch a{color:var(--orange);cursor:pointer;text-decoration:none}
.password-wrapper{position:relative;width:100%;margin-bottom:12px}
.password-wrapper input{width:100%;padding-right:48px;margin-bottom:0}
.pw-toggle{position:absolute;right:4px;top:50%;transform:translateY(-50%);background:none;border:none;font-size:20px;cursor:pointer;padding:12px;color:var(--gray-light);line-height:1;opacity:.8;transition:opacity .2s;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
.pw-toggle:hover{opacity:1}
.pw-toggle.visible{opacity:1;color:var(--orange)}
.error-msg{color:var(--red);text-align:center;margin-top:12px;font-size:14px;min-height:20px}
/* Under a refused sign-in or activation: which door to try. Empty the rest of the time. */
.auth-hint{margin-top:6px}
.auth-hint:empty{display:none}
.btn-primary{width:100%;padding:14px;background:var(--orange);color:var(--white);border:none;border-radius:var(--radius-sm);font-size:16px;font-weight:600;cursor:pointer;transition:background .2s;min-height:48px}
.btn-primary:hover{background:var(--orange-hover)}
.btn-primary:active{transform:scale(.98)}
.btn-primary:disabled{opacity:.5;cursor:not-allowed}
.btn-secondary{width:100%;padding:12px;background:transparent;color:var(--orange);border:1px solid var(--orange);border-radius:var(--radius-sm);font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;min-height:48px}
.btn-secondary:hover{background:var(--orange-dim)}
.btn-danger{padding:8px 16px;background:transparent;color:var(--red);border:1px solid var(--red);border-radius:var(--radius-sm);font-size:13px;cursor:pointer;min-height:36px}
.home-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 0}
.profile-circle{width:48px;height:48px;border-radius:50%;background:var(--bg-card);border:2px solid var(--orange);display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}
.profile-circle img{width:100%;height:100%;object-fit:cover;display:none}
.profile-circle img[src]:not([src=""]){display:block}
.profile-circle img[src]:not([src=""])+span{display:none}
#home-avatar-initial{font-size:20px;font-weight:700;color:var(--orange)}
.online-indicator{width:12px;height:12px;border-radius:50%;background:var(--green);border:2px solid var(--bg)}
.online-indicator.offline{background:var(--red);border-radius:2px}
.duty-officer-tile{flex:1;min-width:0;margin:0 10px;padding:7px 10px;border:1px solid rgba(255,107,0,.35);border-radius:16px;background:linear-gradient(180deg,rgba(255,107,0,.12),rgba(255,255,255,.025));color:var(--white);display:flex;flex-direction:column;align-items:stretch;gap:3px;justify-content:center;cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.14);min-height:50px;max-width:280px;text-align:left}
.duty-officer-tile:active{transform:scale(.98)}
.duty-tile-label{color:var(--orange);font-size:13px;line-height:1.05;font-weight:900;letter-spacing:.01em;white-space:nowrap;text-align:center}
.duty-tile-summary{display:flex;flex-direction:column;gap:1px;min-width:0}
.duty-tile-row{display:flex;align-items:baseline;justify-content:center;gap:7px;min-width:0;line-height:1.12;text-align:center}
.duty-tile-role{color:var(--gray-light);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;opacity:.86}
.duty-tile-role::after{content:':'}.duty-tile-name{font-size:11px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:155px}
.duty-detail-overlay{position:fixed;inset:0;background:rgba(0,0,0,.62);z-index:9998;display:flex;align-items:flex-end;justify-content:center;padding:16px}
.duty-detail-sheet{width:100%;max-width:420px;background:var(--bg-card);border:1px solid var(--border);border-radius:20px 20px 16px 16px;box-shadow:0 24px 70px rgba(0,0,0,.46);padding:18px}
.duty-detail-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.duty-detail-title{font-size:16px;font-weight:800;color:var(--white)}
.duty-detail-close{background:none;border:none;color:var(--gray-light);font-size:22px;cursor:pointer;min-width:36px;min-height:36px}
.duty-detail-person{padding:13px 0;border-top:1px solid var(--border)}
.duty-detail-role{color:var(--orange);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.duty-detail-name{font-size:16px;font-weight:800;color:var(--white);margin-bottom:6px}
.duty-detail-meta{font-size:13px;color:var(--gray-light);line-height:1.5}
@media(max-width:380px){.duty-officer-tile{margin:0 7px;padding:6px 8px;min-height:48px}.duty-tile-label{font-size:12px}.duty-tile-row{gap:5px}.duty-tile-role{font-size:8px}.duty-tile-name{font-size:10px;max-width:132px}}
.home-logo{text-align:center;padding:30px 0 40px}
.home-logo .logo-text{font-size:32px}
.home-logo .logo-sub{font-size:16px;letter-spacing:10px}
.nav-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 20px}
.nav-btn{background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.018));border:1px solid rgba(255,255,255,.10);border-radius:17px;padding:20px 14px;display:flex;flex-direction:column;align-items:center;gap:11px;cursor:pointer;transition:transform .18s,border-color .18s,background .18s,box-shadow .18s;min-height:106px;box-shadow:0 10px 26px rgba(0,0,0,.16)}
.nav-btn:hover{border-color:rgba(255,107,0,.38);background:linear-gradient(180deg,rgba(255,107,0,.055),rgba(255,255,255,.02));box-shadow:0 14px 32px rgba(0,0,0,.18)}
.nav-btn:active{transform:scale(.97)}
.nav-btn:last-child:nth-child(odd){grid-column:1/-1}
/* Home's bottom buttons: one of them can be hidden (Photo Uploads, inside the store app), so
   the rule above, which goes by a button's place in the page, can't tell which one is left
   alone. app.js (_fitHomeButtons) marks the last button that shows when an odd number show. */
#view-home .nav-grid>.nav-btn{grid-column:auto}
#view-home .nav-grid>.nav-btn.nav-btn-row{grid-column:1/-1}
.nav-icon{width:52px;height:52px;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,107,0,.18);font-size:0;display:flex;align-items:center;justify-content:center;color:var(--orange)}
.nav-icon svg,.sleek-icon{width:29px;height:29px;stroke-width:1.7;color:currentColor;display:block}
.leader-nav-btn .nav-icon{width:48px;height:48px;border-radius:15px}
.leader-nav-btn .nav-icon svg{width:27px;height:27px}
.nav-label{color:var(--white);font-size:13.5px;font-weight:700;letter-spacing:.005em;text-align:center;line-height:1.24}
.rt-tile-icon{width:46px;height:46px;border-radius:15px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.16);display:flex;align-items:center;justify-content:center;color:#fff;flex-shrink:0}
.rt-tile-icon svg{width:25px;height:25px}

.pending-badge{text-align:center;margin:20px;padding:10px;background:var(--orange-dim);border-radius:var(--radius-sm);color:var(--orange);font-size:14px;font-weight:600}
.view-header{display:flex;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--bg);z-index:10}
.back-btn{background:none;border:none;color:var(--orange);font-size:24px;cursor:pointer;padding:4px 12px 4px 0;min-width:40px;min-height:48px;display:flex;align-items:center}
.view-header h1{flex:1;font-size:18px;font-weight:700}
.header-action{background:none;border:none;color:var(--orange);font-size:14px;cursor:pointer;padding:8px;font-weight:600}
.section-list{padding:12px 20px}
.section-btn{display:flex;align-items:center;width:100%;padding:16px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;cursor:pointer;transition:all .2s;text-align:left}
.section-btn:hover{border-color:var(--orange)}
.section-btn:active{transform:scale(.98)}
.section-icon{font-size:24px;margin-right:14px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.section-icon svg{width:22px;height:22px;stroke-width:1.5;color:var(--orange)}
.section-info{flex:1}
.section-name{display:block;color:var(--white);font-size:15px;font-weight:600}
.section-desc{display:block;color:var(--gray);font-size:12px;margin-top:2px}
.chevron{color:var(--gray);font-size:20px;margin-left:8px}
.section-divider{height:1px;background:var(--border);margin:16px 0}
.section-heading{color:var(--gray);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:12px;padding-left:4px}
.profile-content{padding:20px}
.profile-photo-section{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;margin-bottom:24px}
.profile-photo-lg{width:100px;height:100px;border-radius:50%;background:var(--bg-card);border:3px solid var(--orange);display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}
.profile-photo-lg img{width:100%;height:100%;object-fit:cover;display:none}
.profile-photo-lg img[src]:not([src=""]){display:block}
.profile-photo-lg img[src]:not([src=""])+span{display:none}
#profile-avatar-initial{font-size:36px;font-weight:700;color:var(--orange)}
.photo-overlay{position:absolute;bottom:0;left:0;right:0;background:rgba(0,0,0,.6);text-align:center;padding:4px;font-size:14px}
.profile-photo-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;width:100%;max-width:320px}
.profile-photo-action{border:1px solid var(--border);background:var(--bg-card);color:var(--white);border-radius:999px;padding:9px 14px;font-size:13px;font-weight:700;min-height:40px;cursor:pointer}
.profile-photo-action.update-action{border-color:var(--orange);color:var(--orange);background:var(--orange-dim)}
.profile-photo-action:active{transform:scale(.98)}
.form-group{margin-bottom:16px}
.form-group label{display:block;color:var(--gray-light);font-size:13px;font-weight:600;margin-bottom:6px;text-transform:uppercase;letter-spacing:.5px}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:12px 14px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font-size:15px;outline:none;transition:border-color .2s;font-family:inherit}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--orange)}
.form-group textarea{min-height:80px;resize:vertical}
.form-group select{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center}
.form-group select option{background:var(--bg-card);color:var(--white)}
.toggle-container{display:flex;align-items:center;gap:12px}
.toggle{position:relative;display:inline-block;width:52px;height:28px}
.toggle input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#555;border-radius:28px;transition:.3s}
.toggle-slider:before{content:"";position:absolute;height:22px;width:22px;left:3px;bottom:3px;background:var(--white);border-radius:50%;transition:.3s}
.toggle input:checked+.toggle-slider{background:var(--orange)}
.toggle input:checked+.toggle-slider:before{transform:translateX(24px)}
#availability-label{font-size:15px;font-weight:600}
#certs-list{margin-bottom:16px}
.cert-item{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px}
.cert-item-info{flex:1}
.cert-item-name{font-size:14px;font-weight:600}
.cert-item-expiry{font-size:12px;color:var(--gray);margin-top:2px}
.cert-item-expiry.expired{color:var(--red)}
.cert-add{display:flex;flex-direction:column;gap:8px}
.form-content{padding:20px}
.form-section{margin-bottom:24px}
.form-section-title{font-size:15px;font-weight:700;color:var(--orange);margin-bottom:12px;border-bottom:1px solid var(--border);padding-bottom:8px}
.checkbox-group{display:flex;flex-direction:column;gap:8px}
.checkbox-item{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;min-height:48px}
.checkbox-item input[type="checkbox"]{width:22px;height:22px;accent-color:var(--orange);flex-shrink:0;cursor:pointer}
.checkbox-item label{flex:1;font-size:14px;cursor:pointer}
.inspection-item{padding:14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:8px}
.inspection-item-header{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.inspection-item-header input[type="checkbox"]{width:22px;height:22px;accent-color:var(--orange)}
.inspection-item-header label{font-size:14px;font-weight:600;flex:1}
.inspection-item-details{display:flex;gap:8px;margin-top:8px}
.inspection-item-details select{flex:1;padding:8px;font-size:13px}
.inspection-item-details input{flex:1;padding:8px;font-size:13px}
.signature-section{margin-top:20px}
.signature-canvas-container{border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);overflow:hidden;position:relative}
.signature-canvas{width:100%;height:150px;touch-action:none}
.signature-clear{position:absolute;top:8px;right:8px;background:var(--bg);border:1px solid var(--border);color:var(--gray);border-radius:4px;padding:4px 10px;font-size:12px;cursor:pointer}
.signature-label{font-size:12px;color:var(--gray);text-align:center;padding:6px}
.photo-section{margin-top:12px}
.photo-btn{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);cursor:pointer;color:var(--orange);font-size:14px;font-weight:600;min-height:48px;width:100%}
.photo-btn:hover{border-color:var(--orange)}
/* "Take Photo" and "Choose Photo" side by side; alone, the second sits full width. */
.photo-btn-row{display:flex;gap:8px}
.photo-btn-row .photo-btn{flex:1;width:auto;padding:12px 8px}
.photo-library-btn{margin-bottom:8px}
.photo-btn-row .photo-library-btn{margin-bottom:0}
.photo-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.photo-thumb{width:80px;height:80px;border-radius:var(--radius-sm);object-fit:cover;border:1px solid var(--border)}
.risk-group{display:flex;gap:8px;margin-top:6px}
.yesno-toggle{display:flex;gap:8px;margin-left:auto;flex-shrink:0}
.yn-btn{padding:10px 16px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-card);color:var(--gray-light);cursor:pointer;font-size:14px;font-weight:600;min-width:44px;min-height:44px;text-align:center}
.yn-active-yes{background:#2d5a27;border-color:#44bb44;border-width:3px;color:#fff;font-weight:800}
.yn-active-no{background:#5a1a1a;border-color:#ff4444;border-width:3px;color:#fff;font-weight:800}
.yesno-label,.supplied-label{font-size:14px;font-weight:600;flex:1}
.inspection-note{width:100%;padding:8px;font-size:13px;margin-top:4px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);color:var(--white)}
.risk-btn{flex:1;padding:12px;text-align:center;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg-card);color:var(--white);cursor:pointer;font-size:14px;font-weight:600;min-height:48px}
.risk-btn.selected-low{background:#2d5a27;border-color:#44bb44;border-width:3px;box-shadow:inset 0 0 0 1px #44bb44}
.risk-btn.selected-med{background:#5a4a00;border-color:#ffaa00;border-width:3px;box-shadow:inset 0 0 0 1px #ffaa00}
.risk-btn.selected-high{background:#5a1a1a;border-color:#ff4444;border-width:3px;box-shadow:inset 0 0 0 1px #ff4444}
.add-section-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;background:transparent;border:1px dashed var(--orange);border-radius:var(--radius-sm);color:var(--orange);cursor:pointer;font-size:14px;font-weight:600;width:100%;margin-top:8px;min-height:48px}
.remove-section-btn{position:absolute;top:-8px;right:-8px;z-index:1;width:28px;height:28px;padding:0;border:none;border-radius:50%;background:var(--red);color:var(--white);font-size:18px;font-weight:700;line-height:1;display:flex;align-items:center;justify-content:center;cursor:pointer}
.remove-section-btn::before{content:'';position:absolute;top:-8px;right:-8px;bottom:-8px;left:-8px}
.toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:var(--bg-card);color:var(--white);padding:12px 24px;border-radius:var(--radius);border:1px solid var(--orange);font-size:14px;font-weight:600;opacity:0;transition:opacity .3s;z-index:1000;pointer-events:none;max-width:90%}
.toast.show{opacity:1}
.dual-sig{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.dual-sig .signature-canvas-container{min-height:120px}
::-webkit-scrollbar{width:4px}
::-webkit-scrollbar-track{background:var(--bg)}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:4px}
/* MER Reference */
.mer-ref{padding:0 12px 20px}
.mer-tabs{display:flex;gap:4px;margin-bottom:16px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:2px}
.mer-tab{flex:1;min-width:0;padding:10px 6px;border:none;border-radius:var(--radius-sm);background:var(--bg-card);color:var(--gray);font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:all .15s}
.mer-tab.active{background:var(--orange);color:#fff}
.mer-body{}
.mer-section{margin-bottom:16px}
.mer-section-title{font-size:14px;font-weight:700;margin-bottom:8px;color:var(--gray-light)}
.mer-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px}
.mer-alert{background:rgba(255,107,53,0.1);border-color:var(--orange);margin-bottom:16px;font-size:13px;line-height:1.5}
.mer-quote{background:var(--bg-input);border-left:3px solid var(--orange);padding:10px 12px;border-radius:4px;font-size:13px;line-height:1.5;margin-bottom:10px}
.mer-list{margin:6px 0 0 18px;font-size:13px;line-height:1.6}
.mer-list-num{margin:8px 0 0 18px;font-size:13px;line-height:1.8}
.mer-sm{font-size:12px;color:var(--gray);font-style:italic;margin:6px 0}
.mer-triage-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
@media(max-width:400px){.mer-triage-grid{grid-template-columns:1fr}}
.mer-triage-card{background:var(--bg-card);border-radius:var(--radius-sm);padding:12px;border-left:4px solid}
.mer-triage-card.mer-black{border-color:#666}
.mer-triage-card.mer-green{border-color:#44bb44}
.mer-triage-card.mer-yellow{border-color:#f0c040}
.mer-triage-card.mer-red{border-color:#ff4444}
.mer-triage-hdr{font-size:15px;font-weight:800;margin-bottom:4px}
.mer-triage-status{font-size:12px;color:var(--gray-light);margin-bottom:2px}
.mer-triage-action{font-size:11px;font-weight:600;color:var(--orange);margin-bottom:6px}
.mer-triage-label{font-size:11px;font-weight:600;color:var(--gray);margin-top:6px}
.mer-triage-note{font-size:11px;font-weight:600;color:var(--orange);margin-top:8px;padding-top:6px;border-top:1px solid var(--border)}
.mer-cb-item{display:flex;align-items:flex-start;gap:8px;padding:4px 0;font-size:13px;line-height:1.4;border-bottom:1px solid rgba(255,255,255,0.05)}
.mer-cb-item:last-child{border-bottom:none}
.mer-cb{color:var(--gray);font-size:14px;flex-shrink:0}
.mer-dispatch-row{padding:8px 10px;border-radius:4px;font-size:13px;line-height:1.5;margin-bottom:6px}
.mer-dispatch-row:last-child{margin-bottom:0}
.mer-green-bg{background:rgba(68,187,68,0.12)}
.mer-ry-bg{background:rgba(240,192,64,0.12)}
.mer-black-bg{background:rgba(255,255,255,0.06)}
.mer-red-text{color:#ff4444;font-weight:700}
.mer-yellow-text{color:#f0c040;font-weight:700}
.mer-green-text{color:#44bb44;font-weight:700}
.mer-black-text{color:#999;font-weight:700}
.mer-role-duty{padding:6px 0;border-bottom:1px solid rgba(255,255,255,0.05);font-size:13px;line-height:1.5}
.mer-role-duty:last-child{border-bottom:none}

/* Briefing Guide */
.bg-guide{display:flex;flex-direction:column;gap:16px;padding:8px 0}
.bg-card{background:#242424;border-radius:12px;overflow:hidden}
.bg-card.bg-highlight{background:#2a2015;border:1px solid rgba(255,107,53,0.2)}
.bg-header{background:rgba(255,107,53,0.15);color:#FF6B35;font-weight:700;font-size:15px;padding:12px 16px}
.bg-subtitle{color:#999;font-size:12px;padding:4px 16px 0;font-style:italic}
.bg-body{padding:12px 16px}
.bg-list{list-style:none;padding:0;margin:0}
.bg-list li{padding:8px 0;border-bottom:1px solid rgba(255,255,255,0.06);color:#ddd;font-size:14px;line-height:1.5;position:relative;padding-left:20px}
.bg-list li::before{content:'•';color:#FF6B35;position:absolute;left:0;font-weight:700}
.bg-list li:last-child{border-bottom:none}
.bg-list li strong{color:#fff}
.bg-list li em{color:#FF6B35}
.bg-list li.bg-sidebar{background:rgba(255,255,255,0.03);margin:8px -16px -12px;padding:10px 16px 10px 36px;border-radius:0 0 12px 12px;border-bottom:none}
.bg-acronym{list-style:none;padding:0;margin:0}
.bg-acronym li{display:flex;align-items:baseline;gap:10px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,0.06);color:#ddd;font-size:14px;line-height:1.5}
.bg-acronym li:last-child{border-bottom:none}
.bg-acronym li strong{color:#fff}
.bg-letter{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;background:#FF6B35;color:#1a1a1a;border-radius:6px;font-weight:800;font-size:15px;flex-shrink:0}

/* Field Notes */
.search-bar{padding:0 20px;position:sticky;top:57px;z-index:9;background:var(--bg);padding-top:12px;padding-bottom:12px}
.search-bar input{width:100%;padding:10px 14px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font-size:14px;outline:none}
.search-bar input:focus{border-color:var(--orange)}
.search-bar input::placeholder{color:var(--gray)}
.notes-list{padding:0 20px 20px}
.note-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px;margin-bottom:10px;cursor:pointer;transition:all .2s}
.note-card:hover{border-color:var(--orange)}
.note-card:active{transform:scale(.98)}
.note-card-title{font-size:15px;font-weight:600;color:var(--white);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.note-card-time{font-size:11px;color:var(--gray);margin-bottom:6px}
.note-card-tags{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:6px}
.note-card-preview{font-size:13px;color:var(--gray);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.note-editor{padding:20px}
.note-editor textarea{width:100%;padding:12px 14px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font-size:15px;font-family:inherit;outline:none;resize:vertical;min-height:200px}
.note-editor textarea:focus{border-color:var(--orange)}
.note-timestamp{font-size:12px;color:var(--gray);font-style:italic;margin-bottom:12px}
.note-tags{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.note-tag{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:600;cursor:pointer;transition:opacity .2s}
.note-tag .note-tag-x{font-size:14px;margin-left:2px;opacity:.7}
.note-tag .note-tag-x:hover{opacity:1}
.note-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:8px;margin:12px 0}
.note-photo-thumb{position:relative;width:100%;padding-bottom:100%;border-radius:var(--radius-sm);overflow:hidden;border:1px solid var(--border)}
.note-photo-thumb img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.note-photo-thumb .note-photo-x{position:absolute;top:0;right:0;width:44px;height:44px;background:rgba(0,0,0,.7);color:var(--white);border:none;border-radius:50%;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}
.note-actions{display:flex;gap:8px;margin-top:16px}
.note-actions .btn-secondary{width:auto;flex:1;padding:10px 16px;font-size:13px;min-height:42px}
.note-delete-btn{color:var(--red)!important}
.note-tag-picker{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.6);display:flex;align-items:center;justify-content:center;z-index:100}
.note-tag-picker-inner{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:20px;max-width:320px;width:90%}
.note-tag-picker-inner h3{margin-bottom:12px;font-size:16px}
.note-tag-picker-items{display:flex;flex-wrap:wrap;gap:8px}
.note-tag-picker-item{padding:8px 14px;border-radius:20px;font-size:13px;font-weight:600;cursor:pointer;border:2px solid transparent;transition:all .15s}
.note-tag-picker-item.selected{border-color:var(--white)}
.note-tag-picker-done{margin-top:16px;width:100%;padding:10px;background:var(--orange);color:var(--white);border:none;border-radius:var(--radius-sm);font-size:14px;font-weight:600;cursor:pointer}
.notes-empty{text-align:center;padding:40px 20px;color:var(--gray);font-size:14px}

/* Deployed advance requests */
.advance-view{padding:14px 16px calc(32px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:14px;max-width:520px;width:100%;margin:0 auto}
.advance-deployment-card,.advance-panel{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.advance-deployment-card{border-color:rgba(255,107,0,.42);background:linear-gradient(145deg,rgba(255,107,0,.12),var(--bg-card))}
.advance-kicker{color:var(--orange);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-bottom:4px}
.advance-deployment{font-size:18px;font-weight:800;color:var(--white)}
.advance-eligibility-message{font-size:13px;color:var(--gray-light);line-height:1.45;margin-top:6px}
.advance-panel h2{font-size:17px;margin:0 0 13px;color:var(--white)}
.advance-panel label{display:block;font-size:13px;font-weight:700;color:var(--gray-light);margin:13px 0 6px}
.advance-panel input,.advance-panel select,.advance-panel textarea{width:100%;padding:12px 13px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font:inherit;font-size:16px;outline:none}
.advance-panel input:focus,.advance-panel select:focus,.advance-panel textarea:focus{border-color:var(--orange)}
.advance-panel textarea{resize:vertical;min-height:96px;line-height:1.4}
.advance-panel .btn-primary{margin-top:16px}
.advance-type-copy{display:grid;grid-template-columns:minmax(116px,.8fr) minmax(0,1.2fr);gap:9px;padding:9px 0;border-bottom:1px solid rgba(255,255,255,.06);font-size:12px;line-height:1.4}
.advance-type-copy strong{color:var(--white)}
.advance-type-copy span{color:var(--gray-light)}
.advance-error{min-height:20px;color:var(--red);font-size:13px;font-weight:650;line-height:1.4;padding:0 2px}
.advance-history-panel{padding-bottom:8px}
.advance-row{padding:14px 0;border-top:1px solid var(--border)}
.advance-row:first-child{border-top:0;padding-top:0}
.advance-row-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.advance-row-title{font-size:14px;font-weight:800;color:var(--white)}
.advance-row-amount{display:flex;flex-direction:column;align-items:flex-end;gap:3px;font-size:17px;font-weight:850;color:var(--white);white-space:nowrap}
.advance-row-approved{font-size:11px;font-weight:750;color:var(--orange)}
.advance-row-meta{font-size:12px;color:var(--gray);margin-top:4px;line-height:1.45}
.advance-row-explanation{font-size:13px;color:var(--gray-light);margin-top:8px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45}
.advance-status{display:inline-flex;margin-top:8px;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;background:rgba(255,255,255,.08);color:var(--gray-light)}
.advance-status-submitted{background:rgba(245,158,11,.16);color:#fbbf24}
.advance-status-approved{background:rgba(34,197,94,.16);color:#4ade80}
.advance-status-declined{background:rgba(239,68,68,.16);color:#f87171}
.advance-status-cancelled{background:rgba(148,163,184,.16);color:#cbd5e1}
.advance-status-paid{background:rgba(59,130,246,.16);color:#60a5fa}
.advance-cancel{width:100%;margin-top:11px;min-height:44px;border:1px solid var(--red);border-radius:var(--radius-sm);background:transparent;color:var(--red);font-size:13px;font-weight:750;cursor:pointer}
.advance-cancel:disabled{opacity:.5;cursor:not-allowed}
.advance-empty{text-align:center;color:var(--gray);font-size:13px;padding:18px 4px 22px}
@media(max-width:380px){.advance-view{padding-left:12px;padding-right:12px}.advance-deployment-card,.advance-panel{padding:14px}.advance-type-copy{grid-template-columns:1fr;gap:2px}.advance-row-head{align-items:flex-start}.advance-row-amount{font-size:16px}}

/* All-user receipt inbox */
.receipt-view{width:100%;max-width:520px;margin:0 auto;padding:14px 16px calc(32px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:14px}
.receipt-capture-card,.receipt-history-card{min-width:0;padding:16px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius)}
.receipt-capture-card{border-color:rgba(255,107,0,.42);background:linear-gradient(145deg,rgba(255,107,0,.10),var(--bg-card))}
.receipt-kicker{margin-bottom:4px;color:var(--orange);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.receipt-capture-card h2,.receipt-history-card h2{margin:0;color:var(--white);font-size:17px}
.receipt-help{margin:7px 0 14px;color:var(--gray-light);font-size:13px;line-height:1.5}
.receipt-picker-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.receipt-picker{min-width:0;min-height:88px;padding:12px 9px;border:1px solid var(--border);border-radius:12px;background:var(--bg-input);color:var(--white);font:inherit;font-size:13px;font-weight:750;line-height:1.3;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.receipt-picker:active,.receipt-submit:active,.receipt-another:active,.receipt-refresh:active,.receipt-file-link:active{transform:scale(.98)}
.receipt-picker .sleek-icon{width:25px;height:25px;color:var(--orange)}
.receipt-hidden-input{display:none}
.receipt-selection{margin-top:14px;min-width:0}
.receipt-image-card,.receipt-pdf-card{display:flex;align-items:center;gap:12px;min-width:0;padding:11px;border:1px solid var(--border);border-radius:12px;background:rgba(0,0,0,.18)}
.receipt-image-card img{width:82px;height:98px;flex:0 0 auto;border-radius:8px;background:var(--bg-input);object-fit:cover}
.receipt-image-card div,.receipt-pdf-card div{min-width:0;display:flex;flex-direction:column;gap:4px}
.receipt-image-card strong,.receipt-pdf-card strong{color:var(--white);font-size:13px}
.receipt-image-card span,.receipt-pdf-card span{max-width:100%;overflow-wrap:anywhere;color:var(--gray-light);font-size:12px;line-height:1.35}
.receipt-pdf-card .sleek-icon{width:35px;height:35px;flex:0 0 auto;color:var(--orange)}
.receipt-submit,.receipt-another{width:100%;min-height:48px;margin-top:11px;padding:11px 14px;border:0;border-radius:var(--radius-sm);background:var(--orange);color:#fff;font:inherit;font-size:14px;font-weight:800;cursor:pointer}
.receipt-submit:disabled{opacity:.55;cursor:not-allowed}
.receipt-status{min-height:20px;margin-top:10px;color:var(--gray-light);font-size:13px;font-weight:650;line-height:1.45}
.receipt-recorded-card{padding:13px;border:1px solid rgba(34,197,94,.42);border-radius:12px;background:rgba(34,197,94,.10);color:#4ade80;text-align:center;display:flex;flex-direction:column;align-items:center;gap:7px}
.receipt-recorded-card .sleek-icon{width:28px;height:28px}
.receipt-recorded-card .receipt-another{color:#fff}
.receipt-history-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.receipt-refresh{min-width:72px;min-height:44px;padding:8px 11px;border:1px solid var(--border);border-radius:10px;background:var(--bg-input);color:var(--orange);font:inherit;font-size:12px;font-weight:750;cursor:pointer}
.receipt-loading,.receipt-empty,.receipt-history-error,.receipt-more{padding:18px 4px;color:var(--gray);font-size:13px;line-height:1.45;text-align:center}
.receipt-history-error{color:#f87171}
.receipt-more{padding-bottom:4px;color:var(--gray-light)}
.receipt-history-row{display:grid;grid-template-columns:88px minmax(0,1fr);gap:12px;padding:13px 0;border-top:1px solid var(--border);min-width:0}
.receipt-history-row:first-child{padding-top:0;border-top:0}
.receipt-history-thumb{width:88px;height:104px;border-radius:9px;background:var(--bg-input);object-fit:cover}
.receipt-history-pdf{width:88px;min-height:104px;padding:8px;align-items:center;justify-content:center;flex-direction:column;text-align:center}
.receipt-history-pdf span{display:none}
.receipt-history-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.receipt-history-copy strong{max-width:100%;overflow-wrap:anywhere;color:var(--white);font-size:13px;line-height:1.35}
.receipt-history-copy span{max-width:100%;overflow-wrap:anywhere;color:var(--gray);font-size:11px;line-height:1.4}
.receipt-file-link{min-height:44px;margin-top:3px;padding:10px 12px;border:1px solid rgba(255,107,0,.45);border-radius:9px;color:var(--orange);font-size:12px;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
@media(max-width:390px){.receipt-view{padding-left:12px;padding-right:12px}.receipt-capture-card,.receipt-history-card{padding:14px}.receipt-picker-row{gap:8px}.receipt-picker{padding-left:7px;padding-right:7px;font-size:12px}.receipt-history-row{grid-template-columns:76px minmax(0,1fr);gap:10px}.receipt-history-thumb,.receipt-history-pdf{width:76px}.receipt-image-card img{width:72px;height:88px}}

@supports(padding-top:env(safe-area-inset-top)){.view-header{padding-top:calc(16px + env(safe-area-inset-top))}.auth-container{padding-top:env(safe-area-inset-top)}.view{padding-bottom:calc(40px + env(safe-area-inset-bottom))}}

/* Glossary */
.glossary-view { padding: 0 4px; }
.glossary-cat { margin-bottom: 20px; }
.glossary-cat-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--primary); padding: 8px 0 6px; border-bottom: 2px solid var(--primary); margin-bottom: 8px; }
.glossary-term { padding: 8px 0; border-bottom: 1px solid var(--border); }
.glossary-term-name { display: block; font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.glossary-term-def { display: block; font-size: 13px; color: var(--gray); line-height: 1.4; }

/* Task Book */
.tb-preview{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.tb-preview-level{font-size:15px;font-weight:700;margin-bottom:8px}
.tb-preview-hint{font-size:12px;color:var(--gray);margin-top:8px}
.tb-progress-bar{width:100%;height:6px;background:var(--bg-input);border-radius:3px;overflow:hidden}
.tb-progress-fill{height:100%;border-radius:3px;transition:width .3s ease}
.tb-open-note{margin-bottom:12px;padding:10px 12px;border:1px solid rgba(70,189,198,.45);border-radius:10px;background:rgba(70,189,198,.08);color:var(--text);font-size:12px;line-height:1.45}
.tb-level{background:var(--bg-card);border:1px solid var(--border);border-left:4px solid;border-radius:var(--radius);margin-bottom:10px;overflow:hidden}
.tb-level-header{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 8px;cursor:pointer}
.tb-level-title{font-size:15px;font-weight:700;flex:1}
.tb-level-meta{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--gray)}
.tb-level .tb-progress-bar{margin:0 14px 10px}
.tb-chevron{font-size:14px}
.tb-badge{display:inline-block;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:700;letter-spacing:.5px}
.tb-badge-cl{background:rgba(69,183,209,0.2);color:#45B7D1}
.tb-badge-gov{background:rgba(255,107,53,0.2);color:#FF6B35}
.tb-tasks{padding:0 14px 14px}
.tb-task{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:6px;cursor:pointer;transition:border-color .15s}
.tb-task:hover{border-color:var(--orange)}
.tb-task:active{transform:scale(.98)}
.tb-task-icon{font-size:16px;flex-shrink:0;margin-top:1px}
.tb-task-info{flex:1;min-width:0}
.tb-task-name{font-size:14px;font-weight:500}
.tb-task-detail{font-size:11px;color:var(--gray);margin-top:2px}
.tb-specialty-header{font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:1px;color:var(--gray);margin:20px 0 10px;padding-left:4px}
.tb-signoff-inner{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:20px;max-width:380px;width:90%;max-height:90vh;overflow-y:auto}
.tb-signoff-inner h3{font-size:16px;margin-bottom:8px}
.tb-signoff-badge{margin-bottom:16px}
.tb-signoff-inner .form-group{margin-bottom:12px}
.tb-signoff-inner .form-group label{font-size:12px}
.tb-signoff-inner .form-group input,.tb-signoff-inner .form-group select,.tb-signoff-inner .form-group textarea{font-size:14px;padding:10px 12px}
.tb-signoff-inner .signature-canvas{height:120px}

/* Calendar */
.calendar-icon{width:42px;height:42px;border-radius:50%;background:var(--bg-card);border:2px solid var(--orange);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:20px;transition:all .2s}
.calendar-icon:hover{background:var(--orange-dim)}
.calendar-icon:active{transform:scale(.95)}
.calendar-content{padding:16px 20px}
.cal-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.cal-arrow{background:none;border:1px solid var(--border);color:var(--orange);font-size:18px;width:40px;height:40px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .15s}
.cal-arrow:hover{border-color:var(--orange);background:var(--orange-dim)}
.cal-month-year{font-size:18px;font-weight:700;color:var(--white)}
.cal-weekdays{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-size:12px;color:var(--gray);font-weight:600;margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.cal-cell{aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s;position:relative;background:var(--bg-card);border:1px solid transparent;min-height:44px}
.cal-cell:hover{border-color:var(--orange)}
.cal-cell:active{transform:scale(.95)}
.cal-cell.cal-empty{background:transparent;cursor:default;border:none}
.cal-cell.cal-empty:hover{border-color:transparent}
.cal-cell.cal-today{border-color:var(--orange);background:var(--orange)}
.cal-cell.cal-today .cal-day-num{color:var(--white);font-weight:800}
.cal-cell.cal-dayoff{background:rgba(255,255,255,0.05)}
.cal-cell.cal-selected{border-color:var(--orange);background:var(--orange-dim);box-shadow:0 0 0 2px rgba(255,107,53,0.3)}
.cal-day-num{font-size:14px;font-weight:600;color:var(--white)}
.cal-dots{display:flex;gap:3px;margin-top:2px}
.cal-dot{width:6px;height:6px;border-radius:50%;display:inline-block}
.cal-dot-deployment{background:#4488ff}
.cal-dot-training{background:#4488ff}
.cal-dot-meeting{background:#44bb44}
.cal-dot-event{background:#FF6600}
.cal-dot-dayoff{background:#ff4444}
.cal-dot-available{background:#44bb44}
.cal-day-detail{margin-top:16px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;animation:fadeIn .2s ease}
.cal-detail-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.cal-detail-header span{font-size:15px;font-weight:700;color:var(--white)}
.cal-detail-close{background:none;border:none;color:var(--gray);font-size:20px;cursor:pointer;padding:10px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
.cal-detail-actions{display:flex;gap:8px;margin-top:12px}
.cal-detail-actions .btn-secondary{padding:10px;font-size:13px;min-height:40px}
.cal-no-events{color:var(--gray);font-size:13px;text-align:center;padding:12px 0}
.cal-event-card{background:var(--bg-input);border:1px solid var(--border);border-left:4px solid var(--orange);border-radius:var(--radius-sm);padding:12px;margin-bottom:8px;position:relative}
.cal-event-card.cal-event-off{border-left-color:#888}
.cal-event-title{font-size:14px;font-weight:600;color:var(--white)}
.cal-event-type{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;margin-top:2px}
.cal-event-desc{font-size:13px;color:var(--gray-light);margin-top:4px;line-height:1.4}
.cal-event-meta{font-size:11px;color:var(--gray);margin-top:4px}
.cal-event-delete{position:absolute;top:4px;right:4px;background:none;border:none;cursor:pointer;font-size:18px;opacity:.5;transition:opacity .15s;padding:10px;min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center}
.cal-event-delete:hover{opacity:1}
.cal-legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px;justify-content:center}
.cal-legend-item{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--gray)}

/* Tree ID Guide */
.treeid-content{padding:12px 20px}
.treeid-tabs{display:flex;gap:4px;margin:12px 0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.treeid-tab{padding:8px 14px;border:1px solid var(--border);border-radius:20px;background:var(--bg-card);color:var(--gray);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:all .15s}
.treeid-tab.active{background:var(--orange);color:#fff;border-color:var(--orange)}
.treeid-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:10px;overflow:hidden;transition:border-color .15s}
.treeid-card:hover{border-color:var(--orange)}
.treeid-card-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;cursor:pointer}
.treeid-card-title{flex:1}
.treeid-code{display:inline-block;background:var(--orange);color:#fff;padding:2px 8px;border-radius:4px;font-size:13px;font-weight:800;margin-right:10px;min-width:32px;text-align:center}
.treeid-name{font-size:15px;font-weight:700;color:var(--white)}
.treeid-latin{font-size:12px;color:var(--gray);font-style:italic;margin-top:2px}
.treeid-type-badge{font-size:10px;padding:2px 8px;border-radius:10px;font-weight:600;text-transform:uppercase;letter-spacing:.5px}
.treeid-type-conifer{background:rgba(68,187,68,0.15);color:#44bb44}
.treeid-type-deciduous{background:rgba(255,193,7,0.15);color:#ffc107}
.treeid-chevron{color:var(--gray);font-size:18px;margin-left:8px;transition:transform .2s}
.treeid-card.open .treeid-chevron{transform:rotate(90deg)}
.treeid-card-body{display:none;padding:0 16px 14px;border-top:1px solid var(--border)}
.treeid-card.open .treeid-card-body{display:block}
.treeid-key{background:var(--orange-dim);border-radius:var(--radius-sm);padding:10px 12px;margin:12px 0 10px;font-size:14px;font-weight:600;color:var(--orange);line-height:1.5}
.treeid-key::before{content:'🔑 ';font-size:14px}
.treeid-photos{display:flex;gap:8px;margin:10px 0 6px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.treeid-photo{flex:0 0 auto;text-align:center;position:relative;cursor:pointer}
.treeid-photo img{width:140px;height:105px;object-fit:cover;border-radius:var(--radius-sm);border:1px solid var(--border)}
.treeid-photo-label{display:block;font-size:11px;color:var(--gray);margin-top:3px;font-weight:600}
.treeid-lightbox{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.92);z-index:9999;display:flex;align-items:center;justify-content:center;padding:58px 16px 16px;box-sizing:border-box}
.treeid-lightbox img{max-width:100%;max-height:90vh;border-radius:8px}
.treeid-lightbox-back{position:absolute;top:8px;left:8px;z-index:10000}
.treeid-features{display:grid;gap:8px;margin-top:8px}
.treeid-feat{display:flex;gap:8px;font-size:13px;line-height:1.5}
.treeid-feat-label{font-weight:700;color:var(--gray-light);min-width:70px;flex-shrink:0}
.treeid-feat-val{color:var(--gray-light)}
.treeid-table{width:100%;border-collapse:collapse;font-size:13px}
.treeid-table th{text-align:left;padding:8px 10px;border-bottom:2px solid var(--orange);color:var(--orange);font-size:12px;text-transform:uppercase;letter-spacing:.5px}
.treeid-table td{padding:8px 10px;border-bottom:1px solid var(--border);color:var(--gray-light);vertical-align:top}
.treeid-table tr:hover td{background:var(--orange-dim)}
.treeid-table .treeid-code{font-size:12px;padding:1px 6px}
.treeid-empty{text-align:center;padding:30px;color:var(--gray);font-size:14px}

/* GPS Location Field */
.location-field-wrap{display:flex;gap:6px;align-items:center}
.location-field-wrap input[type="text"],.location-field-wrap .mer-input{flex:1;min-width:0}
.gps-btn{width:42px;height:42px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--orange);font-size:20px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,opacity .15s}
.gps-btn:active{background:var(--orange);color:var(--white)}
.gps-btn:disabled{opacity:.5;cursor:wait}

/* Cert Upload & Cards */
.cert-upload-area { background: var(--card-bg, #1e1e1e); border: 2px dashed rgba(255,107,53,0.4); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; margin-bottom: 12px; transition: border-color 0.2s; }
.cert-upload-area:active { border-color: var(--orange); }
.cert-upload-icon { font-size: 36px; margin-bottom: 8px; }
.cert-upload-text { color: var(--gray, #999); font-size: 13px; }
.cert-add-section { margin-top: 16px; padding-top: 8px; }
.cert-ai-badge { padding: 8px 12px; border-radius: 8px; font-size: 12px; margin: 8px 0; background: rgba(255,107,53,0.15); color: var(--orange); }
.cert-ai-success { background: rgba(76,175,80,0.15); color: #4CAF50; }
.cert-ai-fail { background: rgba(150,150,150,0.15); color: #999; }
.cert-card { background: var(--card-bg, #1e1e1e); border-radius: 10px; padding: 12px; margin-bottom: 8px; position: relative; border-left: 3px solid #4CAF50; }
.cert-card.cert-expired { border-left-color: #f44336; }
.cert-card.cert-expiring { border-left-color: #FF9800; }
.cert-card-header { display: flex; align-items: center; gap: 10px; }
.cert-card-icon { font-size: 24px; flex-shrink: 0; }
.cert-card-info { flex: 1; min-width: 0; }
.cert-card-name { font-weight: 600; font-size: 14px; color: #fff; }
.cert-card-status { font-size: 11px; margin-top: 2px; }
.cert-card-expiry { font-size: 11px; color: var(--gray, #999); margin-top: 1px; }
.cert-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; cursor: pointer; flex-shrink: 0; }
.cert-card-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, rgba(255,255,255,0.12)); }
.cert-view-btn { flex: 1; min-height: 40px; border: 1px solid rgba(255,107,53,0.45); border-radius: 8px; background: rgba(255,107,53,0.14); color: var(--orange, #ff6b35); font-weight: 700; font-size: 13px; cursor: pointer; }
.cert-remove-btn { position: static; background: transparent; border: 1px solid rgba(255,255,255,0.15); color: var(--gray, #999); border-radius: 8px; font-size: 16px; cursor: pointer; opacity: 0.75; padding: 0; min-width: 40px; min-height: 40px; display: flex; align-items: center; justify-content: center; }
.cert-remove-btn:active { opacity: 1; }
.photo-view-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.92); display: flex; flex-direction: column; z-index: 9999; cursor: pointer; }
.photo-view-header { flex:0 0 auto; width:100%; box-sizing:border-box; padding:12px 16px; background:rgba(20,20,20,0.95); border-bottom:1px solid rgba(255,255,255,0.12); }
.photo-view-back, .treeid-lightbox-back, .te-modal-back { background:none; border:none; color:#fff; font-size:18px; font-weight:700; padding:10px 12px; cursor:pointer; }
.photo-view-body { flex:1; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:12px; box-sizing:border-box; }
.external-doc-card { margin:24px 4px; padding:24px 18px; border:1px solid var(--border); border-radius:14px; background:var(--bg-card); text-align:center; }
.external-doc-card h2 { margin:8px 0 10px; font-size:20px; color:var(--text); }
.external-doc-card p { margin:0 0 18px; color:var(--gray); font-size:14px; line-height:1.45; }
.external-doc-icon { width:58px; height:58px; margin:0 auto 8px; border-radius:16px; background:rgba(255,107,0,0.15); color:var(--orange); display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:800; }
.form-select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.15); background: var(--card-bg, #1e1e1e); color: #fff; font-size: 14px; -webkit-appearance: none; }
.form-select option, .form-select optgroup { background: #1e1e1e; color: #fff; }
.form-row { display: flex; gap: 10px; }

/* PDF Viewer */
.pdf-viewer-container { display: flex; flex-direction: column; height: calc(100vh - 160px); }
.pdf-viewer-iframe { flex: 1; width: 100%; border: none; border-radius: 8px; background: #fff; }
.pdf-viewer-actions { margin-top: 12px; text-align: center; }

.pdf-viewer-object { flex: 1; width: 100%; min-height: 70vh; border: none; border-radius: 8px; background: #fff; }
.pdf-mobile-preview { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; }
.pdf-mobile-icon { font-size: 64px; margin-bottom: 16px; }
/* 10s and 18s */
.tens-eighteens { padding: 0 4px; }
.te-section { margin-bottom: 24px; }
.te-header { margin: 0 0 16px; padding: 12px 16px; border-radius: 8px; font-size: 18px; }
.te-orders { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.te-watchouts { background: linear-gradient(135deg, #f39c12, #d68910); }
.te-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; margin-bottom: 8px; background: var(--card-bg, #1e1e1e); border-radius: 8px; }
.te-num { flex-shrink: 0; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.15); border-radius: 50%; font-weight: 700; font-size: 13px; }
.te-text { font-size: 15px; line-height: 1.4; }

/* 10s & 18s Visual Gallery - Vertical Full-Width */
.te-gallery-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 0;
}

.te-card-full {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.te-card-full:active {
  transform: scale(0.98);
}

.te-card-full img {
  width: 100%;
  height: auto;
  display: block;
}

.te-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 58px 20px 20px;
}

.te-modal.active {
  display: flex;
}

.te-modal img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.te-modal-back { position:absolute; top:8px; left:8px; z-index:1; }

/* === COMMS === */
.channel-list{padding:12px 20px}
.channel-section-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--orange);padding:16px 0 8px;border-bottom:1px solid var(--border);margin-bottom:8px}
.channel-card{display:flex;align-items:center;gap:12px;padding:14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;cursor:pointer;transition:all .15s;position:relative}
.channel-card:hover{border-color:var(--orange)}
.channel-card:active{transform:scale(.98)}
.channel-icon{width:44px;height:44px;border-radius:50%;background:var(--bg-input);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;border:2px solid var(--border)}
.channel-icon.dm-icon{background:var(--orange-dim);border-color:var(--orange)}
.channel-icon img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.channel-info{flex:1;min-width:0}
.channel-name{font-size:15px;font-weight:600;color:var(--white);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.channel-preview{font-size:13px;color:var(--gray);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:2px}
.channel-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}
.channel-time{font-size:11px;color:var(--gray)}
.channel-unread{background:var(--orange);color:#fff;font-size:11px;font-weight:700;min-width:20px;height:20px;border-radius:10px;display:flex;align-items:center;justify-content:center;padding:0 6px}
.comms-empty{text-align:center;padding:40px 20px;color:var(--gray);font-size:14px}

/* Chat view */
#view-chat{display:none;flex-direction:column;min-height:100vh;min-height:100dvh;padding-bottom:0}
#view-chat.active{display:flex}
.chat-messages{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 16px;display:flex;flex-direction:column;gap:4px}
.chat-date-sep{text-align:center;padding:12px 0 8px;font-size:11px;color:var(--gray);font-weight:600;letter-spacing:.5px}
.chat-bubble-wrap{display:flex;flex-direction:column;max-width:80%;margin-bottom:2px}
.chat-bubble-wrap.own{align-self:flex-end;align-items:flex-end}
.chat-bubble-wrap.other{align-self:flex-start;align-items:flex-start}
.chat-sender{font-size:11px;font-weight:600;color:var(--orange);margin-bottom:2px;padding:0 4px}
.chat-bubble{padding:10px 14px;border-radius:16px;font-size:15px;line-height:1.4;word-wrap:break-word;position:relative}
.chat-bubble-wrap.own .chat-bubble{background:var(--orange);color:#fff;border-bottom-right-radius:4px}
.chat-bubble-wrap.other .chat-bubble{background:var(--bg-card);color:var(--white);border:1px solid var(--border);border-bottom-left-radius:4px}
.chat-bubble-time{font-size:10px;color:var(--gray);margin-top:2px;padding:0 4px}
.chat-input{display:flex;gap:8px;padding:12px 16px;background:var(--bg);border-top:1px solid var(--border);position:sticky;bottom:0}
.chat-input input{flex:1;padding:12px 16px;background:var(--bg-input);border:1px solid var(--border);border-radius:24px;color:var(--white);font-size:15px;outline:none}
.chat-input input:focus{border-color:var(--orange)}
.chat-send-btn{width:44px;height:44px;border-radius:50%;background:var(--orange);color:#fff;border:none;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s}
.chat-send-btn:active{background:var(--orange-hover)}

/* Crew directory picker */
.crew-directory{padding:0 20px}
.crew-dir-card{display:flex;align-items:center;gap:14px;padding:14px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:8px;cursor:pointer;transition:all .15s}
.crew-dir-card:hover{border-color:var(--orange)}
.crew-dir-card:active{transform:scale(.98)}
.crew-dir-avatar{width:44px;height:44px;border-radius:50%;background:var(--orange-dim);display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700;color:var(--orange);flex-shrink:0;overflow:hidden;border:2px solid var(--orange)}
.crew-dir-avatar img{width:100%;height:100%;object-fit:cover}
.crew-dir-name{font-size:15px;font-weight:600;color:var(--white)}

@supports(padding-bottom:env(safe-area-inset-bottom)){.chat-input{padding-bottom:calc(12px + env(safe-area-inset-bottom))}}

/* Comms / Chat */
.channel-list{padding:0 0 20px}
.chat-messages{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 16px;display:flex;flex-direction:column;gap:4px}
.chat-date-divider{text-align:center;padding:16px 0 8px;font-size:11px;color:var(--gray);font-weight:600}
.chat-date-divider span{background:var(--bg-main);padding:0 12px}
.chat-bubble{display:flex;gap:8px;max-width:85%;margin:2px 0}
.chat-bubble.me{align-self:flex-end;flex-direction:row-reverse}
.chat-bubble.them{align-self:flex-start}
.bubble-avatar{width:32px;height:32px;border-radius:50%;background:var(--orange-dim,rgba(249,115,22,0.15));display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;color:var(--orange);flex-shrink:0;margin-top:2px}
.bubble-content{min-width:0}
.bubble-sender{font-size:11px;font-weight:600;color:var(--orange);margin-bottom:2px}
.bubble-text{padding:8px 12px;border-radius:16px;font-size:14px;line-height:1.4;word-wrap:break-word}
.chat-bubble.me .bubble-text{background:var(--orange);color:white;border-bottom-right-radius:4px}
.chat-bubble.them .bubble-text{background:var(--bg-card);color:white;border-bottom-left-radius:4px}
.bubble-meta{font-size:10px;color:var(--gray);margin-top:2px;padding:0 4px}
.chat-bubble.me .bubble-meta{text-align:right}
.chat-input-bar{display:flex;gap:8px;padding:8px 12px;background:var(--bg-card);border-top:1px solid var(--border);align-items:center;flex-shrink:0}
.chat-input-bar input{flex:1;background:var(--bg-main);border:1px solid var(--border);border-radius:20px;padding:10px 16px;color:white;font-size:14px;outline:none}
.chat-input-bar input:focus{border-color:var(--orange)}
.chat-send-btn{width:40px;height:40px;border-radius:50%;background:var(--orange);border:none;color:white;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.unread-badge{background:var(--orange);color:white;font-size:11px;font-weight:700;padding:2px 7px;border-radius:10px;min-width:18px;text-align:center}
.profile-circle-sm{width:40px;height:40px;border-radius:50%;background:var(--orange-dim,rgba(249,115,22,0.15));display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;color:var(--orange);flex-shrink:0;overflow:hidden}
.profile-circle-sm img{width:100%;height:100%;object-fit:cover}
.profile-circle-sm span{color:var(--orange)}

/* === LEADER TOOLKIT === */
#leader-tools-section{padding:0 20px;margin-top:16px}
.leader-badge{text-align:center;padding:8px 16px;background:linear-gradient(135deg,rgba(255,107,53,0.15),rgba(255,140,0,0.1));border:1px solid rgba(255,107,53,0.3);border-radius:var(--radius);color:var(--orange);font-size:13px;font-weight:600;letter-spacing:0.5px;margin-bottom:12px}
/* Home's deployed tiles: three to a row, and the last row is always filled, whatever the
   number of tiles a role gets. One tile left over spans the row; two share it. (Six
   tracks, each tile two wide. Every last tile is named here, so the bottom grid's
   "last odd tile spans the row" rule never reaches this grid.) */
.leader-tools-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.leader-tools-grid>.nav-btn{grid-column:span 2}
.leader-tools-grid>.nav-btn:last-child:nth-child(3n){grid-column:span 2}
.leader-tools-grid>.nav-btn:last-child:nth-child(3n+1){grid-column:1/-1}
.leader-tools-grid>.nav-btn:last-child:nth-child(3n+2),
.leader-tools-grid>.nav-btn:nth-last-child(2):nth-child(3n+1){grid-column:span 3}
.leader-nav-btn{min-height:80px!important;padding:16px 8px!important}
.leader-nav-btn .nav-label{font-size:12px!important}
/* One deployed tile, two screens (DTR | Form B, My crew | Crew leader): the switch at the
   top of each screen, for whoever has both. Empty for everyone else. */
.screen-switch-slot:empty{display:none}
.screen-switch{display:flex;gap:4px;margin:12px 20px 0;padding:4px;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm)}
#cl-eval-switch .screen-switch{margin-left:16px;margin-right:16px}
.screen-switch-btn{flex:1;min-width:0;min-height:44px;padding:10px 6px;border:none;border-radius:6px;background:transparent;color:var(--gray);font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:background .15s,color .15s}
.screen-switch-btn.active{background:var(--orange);color:#fff;cursor:default}

/* Check-in Cards */
.checkin-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:12px;margin-bottom:8px}
.checkin-card-info{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.checkin-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;flex-shrink:0}
.checkin-avatar-init{background:var(--orange-dim);display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;color:var(--orange)}
.checkin-card-name{font-size:14px;font-weight:600}
.checkin-card-role{font-size:11px;color:var(--gray)}
.checkin-status-btns{display:flex;gap:8px;margin-bottom:8px}
/* Daily Check-in's four buttons: the emoji, and its word under it (store testing A20). */
.checkin-btn{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:8px 2px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--gray);font-size:18px;cursor:pointer;text-align:center;transition:all .15s;min-height:56px}
.checkin-btn-icon{font-size:18px;line-height:1}
.checkin-btn-word{font-size:11px;font-weight:600;line-height:1.15;overflow-wrap:break-word}
.checkin-btn:active{transform:scale(.95)}
.checkin-btn.active-present{background:rgba(39,174,96,0.2);border-color:#27ae60;border-width:3px;color:var(--white)}
.checkin-btn.active-absent{background:rgba(192,57,43,0.2);border-color:#c0392b;border-width:3px;color:var(--white)}
.checkin-btn.active-injured{background:rgba(243,156,18,0.2);border-color:#f39c12;border-width:3px;color:var(--white)}
.checkin-btn.active-rest{background:rgba(59,130,246,0.2);border-color:#60a5fa;border-width:3px;color:var(--white)}
.checkin-btn[aria-pressed="true"] .checkin-btn-word{font-weight:800}
.checkin-note{width:100%;padding:8px 10px;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--white);font-size:13px;outline:none}
.checkin-note:focus{border-color:var(--orange)}

/* Evaluation Cards */
.eval-crew-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;transition:all .15s}
.eval-crew-card:hover{border-color:var(--orange)}
.eval-crew-card:active{transform:scale(.98)}
.eval-crew-info{display:flex;align-items:center;gap:10px}
.eval-done{color:#27ae60;font-size:14px;font-weight:600}
.eval-pending{color:var(--gray);font-size:12px}

/* Evaluation Form */
.eval-category{margin-bottom:16px}
.eval-category-label{font-size:13px;font-weight:600;color:var(--gray-light);margin-bottom:6px;text-transform:uppercase;letter-spacing:0.5px}
.eval-stars{display:flex;gap:6px}
.eval-star{font-size:28px;color:var(--border);cursor:pointer;transition:color .15s;-webkit-tap-highlight-color:transparent;user-select:none}
.eval-star.active{color:#f39c12}
.eval-star:hover{color:#ffb347}
.eval-crew-again-btns{display:flex;gap:10px}
.eval-ca-btn{flex:1;padding:12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--white);font-size:14px;font-weight:600;cursor:pointer;transition:all .15s;min-height:44px}
.eval-ca-btn:active{transform:scale(.97)}
.eval-ca-btn.ca-yes{background:rgba(39,174,96,0.2);border-color:#27ae60;color:#27ae60}
.eval-ca-btn.ca-maybe{background:rgba(243,156,18,0.2);border-color:#f39c12;color:#f39c12}
.eval-ca-btn.ca-no{background:rgba(192,57,43,0.2);border-color:#c0392b;color:#c0392b}
/* Time Off Cards */
.timeoff-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:14px;margin-bottom:10px;border-left:4px solid #ff4444;position:relative}
.timeoff-card-dates{font-size:14px;font-weight:600;color:var(--white)}
.timeoff-card-reason{font-size:12px;color:var(--orange);font-weight:600;text-transform:uppercase;letter-spacing:0.5px;margin-top:2px}
.timeoff-card-notes{font-size:13px;color:var(--gray-light);margin-top:4px}
.timeoff-card-delete{position:absolute;top:10px;right:10px;background:none;border:none;cursor:pointer;font-size:14px;opacity:.5;padding:4px}
.timeoff-card-delete:hover{opacity:1}
.timeoff-empty{text-align:center;padding:40px 20px;color:var(--gray);font-size:14px}
.timeoff-form-wrap{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:16px}

/* RSVP Buttons */
.rsvp-btns{display:flex;gap:6px;margin-top:8px}
.rsvp-btn{flex:1;padding:8px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);color:var(--gray-light);font-size:12px;font-weight:600;cursor:pointer;text-align:center;transition:all .15s}
.rsvp-btn:active{transform:scale(.95)}
.rsvp-btn.rsvp-active-going,.rsvp-btn.rsvp-active-attending{background:rgba(39,174,96,0.2);border-color:#27ae60;color:#27ae60}
.rsvp-btn.rsvp-active-maybe{background:rgba(243,156,18,0.2);border-color:#f39c12;color:#f39c12}
.rsvp-btn.rsvp-active-declined{background:rgba(192,57,43,0.2);border-color:#c0392b;color:#c0392b}
.rsvp-counts{display:flex;gap:10px;font-size:11px;color:var(--gray);margin-top:4px}
.rsvp-badge{display:inline-block;padding:2px 6px;border-radius:4px;font-size:10px;font-weight:600}
.rsvp-badge-attending{background:rgba(39,174,96,0.2);color:#27ae60}
.rsvp-badge-declined{background:rgba(192,57,43,0.2);color:#c0392b}
.rsvp-badge-none{background:rgba(100,100,100,0.2);color:var(--gray)}
.cal-upcoming-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between}
.timeoff-past{opacity:0.5}

.crew-directory{padding:0 0 20px}
#view-chat.active{display:flex;flex-direction:column}

/* DTA Field Module Reference */
.dta-fm-content{padding:12px}
.dta-fm-intro{display:flex;align-items:center;gap:12px;padding:14px;background:var(--bg-card);border:1px solid var(--orange);border-radius:var(--radius);margin-bottom:16px}
.dta-fm-badge{background:var(--orange);color:#fff;font-weight:800;font-size:11px;padding:6px 10px;border-radius:6px;white-space:nowrap;letter-spacing:0.5px}
.dta-fm-intro-text{font-size:14px;font-weight:600;color:var(--white);line-height:1.3}
.dta-fm-section{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);margin-bottom:10px;overflow:hidden;transition:border-color .2s}
.dta-fm-section.open{border-color:var(--orange)}
.dta-fm-header{display:flex;align-items:center;gap:10px;padding:14px 16px;cursor:pointer;-webkit-tap-highlight-color:transparent;user-select:none}
.dta-fm-header:active{background:rgba(255,107,53,0.08)}
.dta-fm-arrow{color:var(--orange);font-size:16px;font-weight:700;width:18px;text-align:center;flex-shrink:0}
.dta-fm-title{font-size:15px;font-weight:700;color:var(--white);flex:1}
.dta-fm-body{padding:4px 16px 16px}
.dta-fm-def{font-size:13px;line-height:1.6;color:var(--gray-light);margin-bottom:12px;padding:10px 12px;background:rgba(255,107,53,0.06);border-left:3px solid var(--orange);border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.dta-fm-subtitle{font-size:13px;font-weight:700;color:var(--orange);margin:14px 0 8px;text-transform:uppercase;letter-spacing:0.5px}
.dta-fm-note{font-size:13px;color:var(--gray-light);line-height:1.5;margin-bottom:10px}
.dta-fm-list{list-style:none;padding:0;margin:0 0 8px}
.dta-fm-list li{font-size:13px;color:var(--gray-light);line-height:1.5;padding:6px 0 6px 20px;position:relative;border-bottom:1px solid rgba(255,255,255,0.04)}
.dta-fm-list li:last-child{border-bottom:none}
.dta-fm-list li::before{content:'•';position:absolute;left:4px;color:var(--orange);font-weight:700}
.dta-fm-steps{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.dta-fm-step{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:var(--bg-input);border-radius:var(--radius-sm);font-size:13px;color:var(--gray-light);line-height:1.4}
.dta-fm-step-num{background:var(--orange);color:#fff;font-weight:800;font-size:12px;min-width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-shrink:0}

/* Tables */
.dta-fm-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:8px -4px;padding:0 4px}
.dta-fm-table{width:100%;border-collapse:collapse;font-size:12px;min-width:300px}
.dta-fm-table thead th{background:rgba(255,107,53,0.15);color:var(--orange);font-weight:700;padding:8px 10px;text-align:left;border-bottom:2px solid var(--orange);white-space:nowrap;position:sticky;top:0}
.dta-fm-table td{padding:8px 10px;border-bottom:1px solid var(--border);color:var(--gray-light);vertical-align:top}
.dta-fm-table tbody tr:hover{background:rgba(255,255,255,0.03)}
.dta-fm-table.dta-fm-compact td,.dta-fm-table.dta-fm-compact th{padding:6px 8px}
.dta-fm-species-table{min-width:500px}
.dta-fm-sp-col{text-align:center!important;min-width:50px}
.dta-fm-x{text-align:center;color:var(--orange);font-weight:700;font-size:14px}
.dta-fm-dc{display:inline-block;background:var(--orange-dim);color:var(--orange);font-weight:700;font-size:11px;padding:2px 6px;border-radius:4px;font-family:monospace;letter-spacing:0.5px}
.dta-fm-low-sev{color:#44bb44;font-weight:600}
.dta-fm-mod-sev{color:#f0c040;font-weight:600}
.dta-fm-high-sev{color:var(--orange);font-weight:600}
.dta-fm-ext-sev{color:var(--red);font-weight:600}

/* Wildlife badges */
.dta-fm-badge-h{background:rgba(68,187,68,0.2);color:#44bb44;padding:3px 8px;border-radius:4px;font-weight:700;font-size:11px}
.dta-fm-badge-m{background:rgba(240,192,64,0.2);color:#f0c040;padding:3px 8px;border-radius:4px;font-weight:700;font-size:11px}
.dta-fm-badge-l{background:rgba(153,153,153,0.2);color:var(--gray);padding:3px 8px;border-radius:4px;font-weight:700;font-size:11px}

/* LOD Cards */
.dta-fm-lod-card{border-radius:var(--radius-sm);padding:12px;margin-bottom:8px;border:1px solid var(--border)}
.dta-fm-lod-vlr{border-left:4px solid #44bb44;background:rgba(68,187,68,0.05)}
.dta-fm-lod-low{border-left:4px solid #78b0e0;background:rgba(120,176,224,0.05)}
.dta-fm-lod-med{border-left:4px solid #f0c040;background:rgba(240,192,64,0.05)}
.dta-fm-lod-high{border-left:4px solid var(--red);background:rgba(255,68,68,0.05)}
.dta-fm-lod-label{font-weight:800;font-size:13px;margin-bottom:6px;color:var(--white)}
.dta-fm-lod-vlr .dta-fm-lod-label{color:#44bb44}
.dta-fm-lod-low .dta-fm-lod-label{color:#78b0e0}
.dta-fm-lod-med .dta-fm-lod-label{color:#f0c040}
.dta-fm-lod-high .dta-fm-lod-label{color:var(--red)}

/* Defect grid */
.dta-fm-defect-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:14px}
.dta-fm-defect{font-size:12px;color:var(--gray-light);display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--bg-input);border-radius:var(--radius-sm)}

/* Callout */
.dta-fm-callout{padding:10px 12px;border-radius:var(--radius-sm);font-size:12px;line-height:1.5;color:var(--gray-light);background:rgba(255,107,53,0.06);border:1px solid rgba(255,107,53,0.2);margin-top:12px}
.dta-fm-callout-warn{background:rgba(255,68,68,0.08);border-color:rgba(255,68,68,0.3);color:#ffaaaa}

/* Procedures grid */
.dta-fm-proc-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:420px){.dta-fm-proc-grid{grid-template-columns:1fr}}
.dta-fm-proc{padding:12px;border-radius:var(--radius-sm);border:1px solid var(--border)}
.dta-fm-proc.safe{border-color:#44bb44;background:rgba(68,187,68,0.05)}
.dta-fm-proc.danger{border-color:var(--red);background:rgba(255,68,68,0.05)}
.dta-fm-proc-label{font-weight:800;font-size:13px;margin-bottom:8px}
.dta-fm-proc.safe .dta-fm-proc-label{color:#44bb44}
.dta-fm-proc.danger .dta-fm-proc-label{color:var(--red)}
.dta-fm-safe-list li::before{content:'✓';color:#44bb44}

/* Tree classes image */
.dta-fm-img-wrap{position:relative;border-radius:var(--radius-sm);overflow:hidden;cursor:pointer;background:#f5f5f5;border:1px solid var(--border)}
.dta-fm-img-wrap:active{opacity:0.9}
.dta-fm-img{width:100%;display:block}
.dta-fm-img-hint{position:absolute;bottom:8px;right:8px;background:rgba(0,0,0,0.7);color:#fff;font-size:11px;padding:4px 8px;border-radius:4px}

/* Lightbox */
.dta-fm-lightbox{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.95);z-index:9999;display:flex;align-items:center;justify-content:center;padding:20px;cursor:pointer}
.dta-fm-lightbox img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}
.dta-fm-lightbox-close{position:absolute;top:16px;right:20px;color:#fff;font-size:28px;font-weight:700;z-index:10000;cursor:pointer;width:40px;height:40px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.15);border-radius:50%}

/* Deployment Documents */
.docs-header { padding: 20px; border-bottom: 1px solid var(--border); }
.docs-list { padding: 12px 20px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 12px;
}
.doc-icon { font-size: 28px; }
.doc-info { flex: 1; }
.doc-title { font-weight: 600; font-size: 15px; }
.doc-status { font-size: 12px; color: var(--gray); margin-top: 2px; }
.doc-actions { display: flex; gap: 8px; }
/* Manifest & RR's buttons: the crew's outlined button, sized to sit three to a row beside the document's name */
.doc-actions .btn-secondary { width: auto; min-height: 40px; font-size: 12px; padding: 8px 12px; }

/* Call Signs */
.callsign-group { background:var(--bg-card); border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-bottom:12px; }
.callsign-group-title { font-size:11px; font-weight:700; color:var(--orange); text-transform:uppercase; letter-spacing:1px; padding:14px 16px 8px; }
.callsign-row { display:flex; align-items:center; padding:0 16px; height:48px; border-bottom:1px solid rgba(255,255,255,0.05); }
.callsign-row:last-of-type { border-bottom:none; }
.callsign-role { font-size:13px; font-weight:500; color:rgba(255,255,255,0.7); flex:0 0 80px; }
.callsign-input { flex:1; min-width:60px; background:transparent; border:none; border-bottom:1px solid rgba(255,255,255,0.1); padding:8px 4px; color:var(--text); font-size:13px; font-weight:600; outline:none; text-align:right; transition:border-color 0.2s; }
.callsign-input:focus { border-bottom-color:var(--orange); }
.callsign-input::placeholder { color:rgba(255,255,255,0.4); font-weight:400; }
.callsign-delete { background:none; border:none; color:rgba(255,255,255,0.3); font-size:18px; cursor:pointer; padding:12px; margin-left:4px; border-radius:6px; transition:color 0.2s; min-width:44px; min-height:44px; display:flex; align-items:center; justify-content:center; }
.callsign-delete:hover { color:#dc2626; }
.callsign-add-btn { display:flex; align-items:center; justify-content:center; gap:6px; width:calc(100% - 32px); margin:8px 16px 12px; padding:10px; background:transparent; border:1px dashed rgba(255,255,255,0.1); border-radius:8px; color:rgba(255,255,255,0.4); font-size:13px; cursor:pointer; transition:all 0.2s; }
.callsign-add-btn:hover { border-color:var(--orange); color:var(--orange); }

/* Call Sign Dropdowns */
.callsign-input select, select.callsign-input {
  background:var(--bg-main); border:1px solid var(--border); border-radius:6px; padding:8px 10px; color:var(--text); font-size:13px; font-weight:500; outline:none; appearance:none; -webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 8px center; padding-right:24px;
  transition:border-color 0.2s;
}
.callsign-input select:focus, select.callsign-input:focus { border-color:var(--orange); }

/* Force dark dropdowns */
select.callsign-input {
  background-color:#2a2a2a !important;
  border:1px solid var(--border) !important;
  border-radius:6px !important;
  color:var(--white) !important;
  font-size:13px !important;
  padding:8px 24px 8px 10px !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 8px center !important;
}
select.callsign-input:focus { border-color:var(--orange) !important; }
select.callsign-input option { background:#2a2a2a; color:var(--white); }

/* Auto-expanding textareas */
textarea.callsign-input { overflow:hidden; resize:none; height:auto; min-height:60px; }
textarea.obj-auto { display:block; width:100%; min-height:60px; height:auto; overflow:hidden; resize:none; box-sizing:border-box; line-height:1.5; padding:10px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:8px; color:var(--text); font-size:14px; }
.callsign-row.obj-row { height:auto; min-height:auto; flex-direction:column; align-items:stretch; padding:10px 16px; gap:4px; }

.nav-badge { position:absolute; top:6px; right:6px; background:#FF6B35; color:#fff; font-size:11px; font-weight:700; min-width:18px; height:18px; line-height:18px; text-align:center; border-radius:9px; padding:0 5px; box-sizing:border-box; }

/* Voice-to-Text Mic Button */
.mic-btn { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; border:1px solid rgba(255,255,255,0.15); background:rgba(255,255,255,0.05); color:var(--gray); font-size:16px; cursor:pointer; transition:all 0.2s; flex-shrink:0; }
.mic-btn:hover { background:rgba(255,255,255,0.1); }
.mic-btn.recording { background:rgba(220,38,38,0.2); border-color:#dc2626; color:#dc2626; animation:mic-pulse 1.5s infinite; }
@keyframes mic-pulse { 0%,100% { box-shadow:0 0 0 0 rgba(220,38,38,0.3); } 50% { box-shadow:0 0 0 8px rgba(220,38,38,0); } }
.mic-btn.unsupported { display:none; }

#view-doc-viewer{padding-bottom:0!important;display:none;flex-direction:column;min-height:100dvh}
#view-doc-viewer.active{display:flex}
#doc-viewer-content{flex:1;overflow:hidden!important;display:flex;flex-direction:column}

/* Loading overlay */
.loading-overlay { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); display:flex; align-items:center; justify-content:center; z-index:9999; }
.loading-overlay .spinner { width:40px; height:40px; border:3px solid rgba(255,255,255,0.2); border-top-color:var(--primary); border-radius:50%; animation:spin 0.8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-overlay .loading-text { color:#fff; margin-top:12px; font-size:14px; text-align:center; }
.loading-overlay .loading-inner { display:flex; flex-direction:column; align-items:center; }
.btn-loading { opacity:0.6; pointer-events:none; }

/* Faller Competency Check */
.faller-page{padding:14px 14px 42px;max-width:980px;margin:0 auto}
.faller-loading,.faller-empty{padding:26px;text-align:center;color:var(--gray)}
.faller-intro,.faller-history{background:linear-gradient(145deg,rgba(255,107,53,.12),rgba(255,255,255,.02));border:1px solid rgba(255,107,53,.25);border-radius:14px;padding:16px;margin-bottom:14px}
.faller-intro h2,.faller-history h2{margin:2px 0 8px;font-size:21px}
.faller-intro p,.faller-history p,.faller-help{font-size:12px;line-height:1.5;color:var(--gray-light);margin:6px 0 10px}
.faller-kicker{font-size:10px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:var(--orange)}
.faller-draft-state{display:inline-flex;padding:4px 8px;border-radius:999px;background:rgba(68,187,68,.12);color:#78db78;font-size:11px;font-weight:700}
.faller-card{background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:14px;margin-bottom:12px}
.faller-card h3{margin:0 0 10px;font-size:16px;color:var(--white)}
.faller-legacy-recovery{border-color:#f59e0b;background:rgba(245,158,11,.08)}.faller-legacy-recovery p{font-size:12px;line-height:1.5;color:var(--gray-light)}.faller-legacy-row{display:grid;gap:3px;padding:8px 0;border-top:1px solid rgba(245,158,11,.22);font-size:12px}.faller-legacy-row span{color:var(--gray-light);white-space:pre-wrap}
.faller-rating-definitions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin:10px 0 2px}.faller-rating-definition{padding:8px;border:1px solid var(--border);border-radius:8px;background:rgba(255,255,255,.025);font-size:11px;line-height:1.3;color:var(--gray-light)}.faller-rating-definition strong{display:block;color:var(--white);font-size:13px;margin-bottom:2px}.faller-paper-note{padding:12px;border-radius:9px;background:rgba(70,189,198,.1);border:1px solid rgba(70,189,198,.32);color:var(--gray-light);font-size:12px;line-height:1.5;margin-bottom:12px}
.faller-card-heading,.faller-history-heading,.faller-history-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.faller-grid,.faller-tree-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.faller-field{display:flex;flex-direction:column;gap:5px;margin-bottom:9px;font-size:12px;color:var(--gray-light)}
.faller-field input,.faller-field select,.faller-field textarea,.faller-check input,.faller-check select{width:100%;box-sizing:border-box;background:var(--bg-input);border:1px solid var(--border);border-radius:8px;color:var(--white);padding:10px;font:inherit}
.faller-mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:12px}
.faller-mode-switch button,.faller-add-tree,.faller-history button,.faller-history-actions button{border:1px solid var(--border);background:var(--bg-input);color:var(--gray-light);border-radius:8px;padding:10px;font-weight:700}
.faller-mode-switch button.active{border-color:var(--orange);background:rgba(255,107,53,.15);color:var(--orange)}
.faller-external{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--gray-light);margin:2px 0 10px}
.faller-check{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:8px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.06)}
.faller-check:last-child{border-bottom:0}.faller-check label{display:flex;flex-direction:column;gap:6px;font-size:12px;line-height:1.35}
.faller-check-comments{grid-column:1/-1}.faller-check-comments summary{cursor:pointer;color:var(--gray-light);font-size:11px;font-weight:700;list-style:none}.faller-check-comments summary::-webkit-details-marker{display:none}.faller-check-comments summary::before{content:'+ ';color:var(--orange)}.faller-check-comments[open] summary::before{content:'− '}.faller-check-comments input{margin-top:7px}
.faller-tree{border:1px solid var(--border);border-radius:10px;padding:12px;margin-top:10px;background:rgba(255,255,255,.02)}
.faller-legend{font-size:11px;color:var(--gray);margin-top:10px;line-height:1.5}
.faller-evidence-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.faller-evidence-document{width:100%;height:140px;display:flex;align-items:center;justify-content:center;border-radius:8px;border:1px solid var(--border);background:var(--bg-input);color:var(--gray-light);font-weight:800;font-size:18px}.faller-photo-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.faller-photo-grid figure{margin:0}.faller-photo-grid img{width:100%;height:140px;object-fit:cover;border-radius:8px;border:1px solid var(--border)}.faller-photo-grid figcaption{display:flex;align-items:flex-start;justify-content:space-between;gap:6px;font-size:11px;color:var(--gray-light)}.faller-photo-grid figcaption span{min-width:0;overflow-wrap:anywhere}
.faller-signatures{display:grid;grid-template-columns:1fr 1fr;gap:10px}.faller-signatures>div>span{display:block;font-size:12px;margin-bottom:5px;color:var(--gray-light)}
.faller-submit{width:100%;min-height:48px;margin-bottom:18px}.faller-submit-status{font-size:12px;min-height:20px;margin:4px 0 8px}.faller-submit-status.error{color:#ff7a7a}.faller-submit-status.pending,.faller-pending{color:#f0c040}
.faller-history{margin-top:10px}.faller-history-card{border:1px solid var(--border);border-radius:10px;padding:12px;margin-top:10px;background:var(--bg-card)}.faller-history-top strong,.faller-history-top small{display:block}.faller-history-top small{font-size:11px;color:var(--gray);margin-top:3px}.faller-history-top>div>span{font-size:10px;text-transform:uppercase;color:var(--orange)}
.faller-result{border-radius:999px;padding:5px 10px;font-size:11px;font-weight:900}.faller-result.pass{background:rgba(34,197,94,.16);border:1px solid #22c55e;color:#6ee7a0}.faller-result.fail{background:rgba(220,38,38,.18);border:1px solid #ef4444;color:#ff8d8d}
.faller-followup{font-size:12px;margin:8px 0;color:var(--gray-light)}.faller-history-card details{font-size:12px}.faller-history-card dl{display:grid;grid-template-columns:minmax(100px,.7fr) 1.3fr;gap:5px;margin:9px 0}.faller-history-card dt{color:var(--gray)}.faller-history-card dd{margin:0}.faller-history-actions{display:flex;justify-content:flex-end;margin-top:9px}
@media(max-width:620px){.faller-grid,.faller-tree-grid,.faller-signatures,.faller-evidence-actions{grid-template-columns:1fr}.faller-check{grid-template-columns:1fr}.faller-rating-definitions{grid-template-columns:repeat(2,minmax(0,1fr))}.faller-page{padding:10px 10px 32px}.faller-card{padding:12px}}
/* Photo contest (public/photo-contest.js) */
.pc-form{padding:12px 16px}
.pc-hint{color:var(--gray);font-size:13px;line-height:1.45;margin:0 0 12px}
.pc-note{color:var(--gray);font-size:13px;line-height:1.45;margin:0 0 10px;padding:0 16px}
.pc-file{width:100%;color:var(--text);margin-bottom:8px}
.pc-field{width:100%;box-sizing:border-box;background:var(--bg-input);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);padding:10px 12px;font-family:inherit;margin-bottom:12px}
.pc-field:focus{border-color:var(--orange);outline:none}
textarea.pc-field{resize:none}
.pc-picked{color:var(--gray-light);font-size:13px;line-height:1.45;margin:0 0 12px}
.pc-picked:empty{display:none}
.pc-consent{color:var(--gray-light);font-size:13px;line-height:1.45;margin:0 0 12px}
.pc-block{margin-top:12px}
.pc-saved-note{color:var(--gray);font-size:12px;line-height:1.45;margin:12px 16px 0}
.pc-empty{color:var(--gray);font-size:13px;line-height:1.45;padding:4px 16px 14px}
.pc-waiting{padding:4px 16px 12px;display:grid;gap:10px}
.pc-waiting-row{display:flex;gap:10px;align-items:center}
.pc-thumb{width:56px;height:56px;flex-shrink:0;position:relative;border-radius:6px;overflow:hidden;background:var(--bg-input);display:flex;align-items:center;justify-content:center;font-size:22px}
.pc-thumb img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.pc-waiting-text{flex:1;min-width:0;font-size:13px}
.pc-waiting-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pc-waiting-state{font-size:12px;color:var(--gray);line-height:1.4}
.pc-waiting-state.pc-blocked{color:var(--red)}
.pc-waiting-actions{display:flex;flex-direction:column;gap:6px;flex-shrink:0}
.pc-small{width:auto;min-height:36px;padding:6px 12px;font-size:13px}
.pc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:2px}
.pc-cell{position:relative;padding-bottom:100%;overflow:hidden;cursor:pointer;background:var(--bg-input)}
.pc-cell img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}
.pc-tile{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--gray);font-size:22px}
.pc-tile span{font-size:10px;margin-top:2px}
.pc-badges{position:absolute;left:4px;bottom:4px;display:flex;gap:4px;z-index:1}
.pc-badge{background:rgba(0,0,0,.72);color:var(--white);font-size:10px;font-weight:700;padding:2px 6px;border-radius:999px}
/* A video in the lists carries its length; in the full-size view it plays. */
.pc-length{position:absolute;right:4px;bottom:4px;background:rgba(0,0,0,.72);color:var(--white);font-size:10px;font-weight:700;padding:2px 6px;border-radius:999px;z-index:1}
.pc-video-hint:empty{display:none}
/* The full-size view covers the whole screen. Inside the store app and the iPhone home-screen web app the page draws under the status bar and the home indicator: its buttons and its text keep clear of both through the safe-area block at the end of this file. */
.pc-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.95);z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:64px 16px 16px;overflow-y:auto}
.pc-overlay-bar{position:absolute;top:12px;right:12px;left:12px;display:flex;gap:8px;justify-content:flex-end}
.pc-overlay-picture{display:flex;flex-direction:column;align-items:center}
.pc-overlay-picture img{max-width:100%;max-height:70vh;object-fit:contain;border-radius:8px}
.pc-player{display:block;width:calc(100vw - 32px);max-width:960px;max-height:70vh;object-fit:contain;border-radius:8px;background:#000}
.pc-overlay-missing{color:var(--gray-light);font-size:14px;text-align:center;line-height:1.5;padding:24px 8px}
.pc-overlay-text{margin-top:12px;text-align:center;max-width:440px}
.pc-overlay-name{font-size:14px;color:var(--text)}
.pc-overlay-caption{font-size:13px;color:var(--gray-light);margin-top:4px;white-space:pre-wrap;overflow-wrap:anywhere}
.pc-overlay-meta{font-size:12px;color:var(--gray);margin-top:4px;line-height:1.45}
.pc-nav-badge{position:absolute;top:8px;right:8px;background:var(--orange);color:var(--white);font-size:11px;font-weight:700;border-radius:999px;min-width:20px;height:20px;line-height:20px;padding:0 6px;text-align:center}
/* Site ERP button: shown only while the person is on a deployment */
.section-btn[hidden]{display:none}
.doc-viewer-header{padding:12px 16px}
/* Crew files (the Province's material, signed-in crew only): a picture keeps its place until its bytes come from the phone's copy or the server, and a note says when the phone has none yet. */
img[data-crew-file]:not([src]){display:block;width:100%;min-height:160px;background:var(--bg-card);border-radius:8px}
.crew-file-missing{color:var(--gray);font-size:13px;line-height:1.5;padding:10px 4px;margin:0}
/* Guests: the store app's public screens, signed out (public tier). The guest Home and its
   buttons; Crew Resources shows only what index.html marks data-guest; Safety & Inspections shows
   the guest list instead of the crew's forms. Nothing here applies on the website. */
.guest-only,.store-app-only{display:none}
body.guest-mode .guest-only,body.store-app .store-app-only{display:block}
body.guest-mode #view-safety>.section-list:not(#guest-safety){display:none}
body.guest-mode #view-resources .section-list>:not([data-guest]){display:none}
.guest-intro{text-align:center;color:var(--gray);font-size:14px;line-height:1.5;padding:0 28px 24px;margin:0}
.guest-actions{display:flex;flex-direction:column;gap:12px;padding:20px 20px 0}
/* The welcome screen fits an iPhone above its home bar ("Crew sign-in" started half hidden under it): less room around the logo, and on shorter screens a smaller logo (its width at most a fifth of the screen's height). The screen's bottom padding already keeps clear of the home bar (.view, in the first safe-area rule). */
#view-guest .home-logo{padding:4px 0 16px}
#view-guest .home-logo-img{max-width:min(220px,20vh)}
.guest-note{text-align:center;color:var(--gray);font-size:13px;margin:4px 0 0}
/* The privacy policy and the open-source notices (PR 5c): the page fills the screen under its header, in a frame. The frame asks for the dark version of the page, to match the app. */
.guest-note a{color:var(--orange);cursor:pointer;text-decoration:none}
.auth-legal{margin-top:24px;font-size:13px}
#view-legal.active{display:flex;flex-direction:column;height:100vh;height:100dvh;padding-bottom:0}
.legal-content{flex:1;min-height:0;display:flex}
.legal-frame{flex:1;width:100%;border:0;background:var(--bg);color-scheme:dark}
.legal-missing{padding:24px 20px;color:var(--gray);font-size:14px;line-height:1.5}
/* My Certs for a guest (kept on the phone only), and Home's offer once signed in to add a guest's certs to the crew profile */
body.guest-mode #view-certs .cert-crew-heading{display:none}
.guest-certs-note{color:var(--gray);font-size:13px;line-height:1.5;margin:0 0 12px}
.guest-offer{margin:0 16px 12px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-card);font-size:13px;line-height:1.45;color:var(--text)}
.guest-offer-title{font-weight:700;margin-bottom:6px}
.guest-offer-text{color:var(--gray);margin:0 0 8px}
.guest-offer-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--border)}
.guest-offer-info{flex:1;min-width:0}
.guest-offer-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.guest-offer-meta{color:var(--gray);font-size:12px}
.guest-offer-add{width:auto;flex:0 0 auto;min-height:40px;padding:6px 18px}
.guest-offer-copy{width:auto;min-height:40px;padding:6px 14px;margin:0 0 4px}
.guest-offer-done{margin-top:8px}
/* Comms safety: the guidelines card, the ⋯ on a message, a folded message from someone blocked, and the Report and Block sheets */
.bubble-more,.bubble-show{background:none;border:none;font:inherit;cursor:pointer;padding:2px 8px}
.bubble-more{color:var(--gray-light);font-size:18px;line-height:1;letter-spacing:1px;padding:6px 10px;margin:-4px 0;vertical-align:middle}
.bubble-show{color:var(--orange);font-weight:600;text-decoration:underline}
.chat-bubble.folded .bubble-text{background:transparent;border:1px dashed var(--border);color:var(--gray)}
.comms-rules{background:var(--bg-card);border:1px solid var(--orange);border-radius:var(--radius);padding:16px;margin:8px 0 12px}
.comms-rules-title{color:var(--orange);margin:0 0 8px;font-size:17px}
.comms-rules p{font-size:14px;line-height:1.5;margin:0 0 8px;color:var(--text)}
.comms-rules ul{margin:0 0 10px 18px;padding:0}
.comms-rules li{font-size:14px;line-height:1.5;margin-bottom:6px;color:var(--text)}
.comms-rules-contact a{color:var(--orange)}
.comms-rules-note{color:var(--gray);font-size:12px;margin-top:8px}
.comms-paused-note{background:var(--bg-card);border:1px solid var(--red);border-radius:var(--radius);padding:12px;margin-bottom:12px;font-size:14px;line-height:1.5;color:var(--text)}
.comms-foot{display:flex;gap:8px 20px;justify-content:center;flex-wrap:wrap;margin:20px 0 8px}
.comms-foot-link{background:none;border:none;color:var(--gray);font-size:13px;text-decoration:underline;cursor:pointer;padding:8px}
.comms-sheet{width:min(520px,100%);max-height:86vh;overflow:auto;background:var(--bg-card);border:1px solid var(--border);border-radius:14px;padding:16px;color:var(--text)}
.comms-sheet-title{margin:0 0 10px;font-size:18px;overflow-wrap:anywhere}
.comms-sheet-quote{margin:0 0 12px;padding:8px 12px;border-left:3px solid var(--border);color:var(--gray-light);font-size:14px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.comms-sheet-action{display:block;width:100%;text-align:left;background:var(--bg-input);border:1px solid var(--border);border-radius:10px;color:var(--text);font-size:15px;padding:14px;margin-bottom:8px;cursor:pointer;overflow-wrap:anywhere}
.comms-sheet-action.danger{color:var(--red)}
.comms-sheet-note{color:var(--gray-light);font-size:13px;line-height:1.5;margin:0 0 12px}
.comms-sheet-label{display:block;color:var(--gray-light);font-size:13px;margin:10px 0 4px}
.comms-sheet-input{width:100%;background:var(--bg-input);border:1px solid var(--border);border-radius:8px;color:var(--text);font-size:16px;padding:10px;font-family:inherit}
.comms-sheet-check{display:flex;align-items:center;gap:8px;margin:12px 0 0;font-size:14px}
.comms-sheet-error{color:var(--red);font-size:13px;margin:10px 0 0}
.comms-sheet-buttons{display:flex;gap:10px;margin-top:14px}
.comms-sheet-buttons>button{flex:1;margin:0}
.comms-sheet-list{margin:0 0 12px 18px;padding:0}
.comms-sheet-list li{font-size:14px;line-height:1.5;margin-bottom:6px}
.comms-sheet-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);font-size:15px;overflow-wrap:anywhere}
.comms-sheet-row>button{width:auto;flex-shrink:0;padding:8px 14px;margin:0}
.comms-sheet-row small{color:var(--gray);font-size:12px}
/* HR -> Report a concern (HR CONCERNS in app.js) */
.hrc-screen{padding:12px 16px 32px}
.hrc-note{color:var(--gray-light);font-size:13px;line-height:1.45;margin:6px 0}
.hrc-help{color:var(--gray);font-size:12px;line-height:1.4;margin:-2px 0 8px}
.hrc-danger{background:rgba(255,68,68,.12);border:1px solid var(--red);border-radius:var(--radius-sm);color:var(--white);font-size:13px;line-height:1.45;padding:10px 12px;margin:8px 0}
.hrc-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px;margin:10px 0}
.hrc-card-alert{border-color:var(--red)}
.hrc-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.hrc-actions{display:flex;gap:8px;margin-top:10px}
.hrc-actions .btn-primary,.hrc-actions .btn-secondary{flex:1}
.hrc-start{margin:8px 0 4px}
.hrc-heading{font-size:15px;color:var(--orange);margin:18px 0 6px}
.hrc-status{font-size:11px;font-weight:700;border-radius:10px;padding:2px 8px;background:var(--bg-input);color:var(--gray-light);white-space:nowrap}
.hrc-status-received{color:#f59e0b}
.hrc-status-looking{color:#3b82f6}
.hrc-status-closed{color:#22c55e}
.hrc-label{display:block;color:var(--gray);font-size:11px;margin-bottom:2px}
.hrc-message,.hrc-outcome{border-top:1px solid var(--border);padding:8px 0;font-size:14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.hrc-from-hr{color:var(--white)}
.hrc-reply{margin:10px 0 8px}
.hrc-step{color:var(--orange);font-size:13px;font-weight:700;margin:4px 0 8px}
.hrc-choices{display:grid;gap:6px;margin:4px 0 10px}
/* The HR team's questions are whole sentences: in ordinary case, not the short-label capitals. */
.hrc-screen .form-group>label{text-transform:none;letter-spacing:0;font-size:14px;line-height:1.4;color:var(--gray-light)}
/* A tick box or a choice with its words beside it. Inside a .form-group the general label and
   input rules would make it a block and the box full width, so these say otherwise. */
.hrc-check,.form-group .hrc-check{display:flex;align-items:flex-start;gap:10px;margin:0;font-size:14px;font-weight:500;line-height:1.4;text-transform:none;letter-spacing:0;color:var(--white);padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-input);cursor:pointer}
.hrc-check input,.form-group .hrc-check input{width:20px;height:20px;min-height:0;flex:0 0 auto;margin:1px 0 0;padding:0;border:none;background:none;accent-color:var(--orange)}
.hrc-row{border-left:2px solid var(--border);padding-left:10px;margin:10px 0}
.hrc-row-head{display:flex;justify-content:space-between;align-items:center;color:var(--gray-light);font-size:12px;font-weight:700;margin-bottom:6px}
.hrc-link{background:none;border:none;color:var(--orange);font-size:13px;font-weight:600;cursor:pointer;padding:6px 0;min-height:32px}
.hrc-files{display:grid;gap:6px;margin:8px 0}
.hrc-file{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px;padding:6px 10px;background:var(--bg-input);border-radius:var(--radius-sm);overflow-wrap:anywhere}
.hrc-policy{font-size:13px;line-height:1.5;color:var(--gray-light);margin:6px 0}
.hrc-nav{display:flex;gap:8px;margin:16px 0 8px}
.hrc-nav .btn-primary,.hrc-nav .btn-secondary{flex:1}
.hrc-discard{display:block;margin:8px auto 0}
/* HR -> Ask HR (HR REQUESTS in app.js): the same cards as Report a concern, and HR's letters */
.hrc-request-open{color:#f59e0b}
.hrc-request-answered{color:#3b82f6}
.hrc-request-closed{color:#22c55e}
.hrc-letter{margin-top:8px;text-align:left;min-height:44px;padding:10px 12px}
/* The store app and the iPhone home-screen web app draw under the status bar (viewport-fit=cover, black-translucent). What sits at the very top or bottom of the screen keeps clear of the status bar and the home indicator, and a strip in the page colour sits behind the status bar so scrolled content doesn't run under the clock. Where env() is 0, as in a desktop browser, nothing moves. Last in the file, so it wins over the rules it adjusts. */
@supports(padding-top:env(safe-area-inset-top)){body::before{content:'';position:fixed;top:0;left:0;right:0;height:env(safe-area-inset-top);background:var(--bg);z-index:9000;pointer-events:none}.home-header{padding-top:calc(16px + env(safe-area-inset-top))}.photo-view-header,.doc-viewer-header{padding-top:calc(12px + env(safe-area-inset-top))}.treeid-lightbox-back,.te-modal-back{top:calc(8px + env(safe-area-inset-top))}.dta-fm-lightbox-close{top:calc(16px + env(safe-area-inset-top))}.toast{bottom:calc(30px + env(safe-area-inset-bottom))}.duty-detail-overlay{padding-bottom:calc(16px + env(safe-area-inset-bottom))}.chat-input-bar{padding-bottom:calc(8px + env(safe-area-inset-bottom))}.search-bar{top:calc(57px + env(safe-area-inset-top))}.pc-overlay{padding:calc(64px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom))}.pc-overlay-bar{top:calc(12px + env(safe-area-inset-top))}.legal-content{padding-bottom:env(safe-area-inset-bottom)}}
/* Date fields side by side: iOS draws a date field wider than its column, so the right one ran off the screen. The column may shrink, and on iOS (only) the field fits it. */
.form-row>.form-group{min-width:0}
@supports(-webkit-touch-callout:none){.form-group input[type="date"]{-webkit-appearance:none;appearance:none;min-width:0;min-height:44px}.form-group input[type="date"]::-webkit-date-and-time-value{text-align:left}}
