:root{font-family:Arial,sans-serif;color:#eaf4f6;background:#0a202b;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;border:1px solid #608695;background:#204856;color:#fff;border-radius:7px;padding:10px 14px}button:hover{background:#306173}button:disabled{opacity:.5;cursor:wait}input,select{display:block;width:100%;padding:12px;margin:7px 0 16px;border:1px solid #6b8f9b;border-radius:7px;background:#102c38;color:#fff}label{display:block;font-size:16px}#gate{max-width:480px;margin:8vh auto;padding:32px;border:1px solid #416776;border-radius:14px;background:#143440}#gate button{width:100%;margin:5px 0}.brand{color:#71d8cc;letter-spacing:4px;font-weight:bold}p{line-height:1.5;color:#bdd2d9}#gateError,#adminMessage{color:#ffcf9b}#workspace{display:flex;flex-direction:column;height:100dvh}#toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;background:#143440;font-size:14px}#toolbar button{font-size:14px;padding:8px}#syncStatus{flex:1;min-width:180px}#appFrame{width:100%;flex:1;min-height:0;border:0;background:white}dialog{color:#eaf4f6;background:#12323f;border:1px solid #598491;border-radius:12px;width:min(1000px,95vw);max-height:90vh}dialog::backdrop{background:#000a}.dialogHead{display:flex;justify-content:space-between;align-items:center}section>h3{border-bottom:1px solid #496b77;padding-bottom:8px}.row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #345561}.row span{flex:1;min-width:180px}form button{margin-bottom:12px}pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}#userForm{display:grid;grid-template-columns:1fr 1fr;gap:8px}#auditList{font-size:14px} [hidden]{display:none!important}@media(max-width:600px){#gate{margin:20px 12px;padding:22px}#toolbar strong{width:100%}#userForm{display:block}}@media print{#toolbar{display:none}#appFrame{height:100vh}}

#recoveryOptions{margin-top:18px;font-size:13px;color:#bdd2d9}#recoveryOptions summary{cursor:pointer}#recoveryOptions p,#recoveryOptions label{font-size:13px}

#onlineInfo{margin:0;padding:6px 12px;font-size:12px;background:#143440}#useOffline{display:inline-block;width:auto;margin:8px}

#previousLogsDialog td,#previousLogsDialog th{padding:8px;text-align:left;border-bottom:1px solid #497184}#previousConfirm{display:inline-block;width:auto;margin:16px 8px 16px 0}#previousIssues{color:#ffcf9b;font-size:13px;margin:8px 0}
@media screen and (max-width:1100px), screen and (pointer:coarse) and (max-width:1400px){
 .pilot-vessel-account #toolbar #previousLogs,.pilot-vessel-account #toolbar #lock{display:none!important}
 .pilot-vessel-account #toolbar{gap:6px;padding:8px}.pilot-vessel-account #accountLabel{flex:1}.pilot-vessel-account #syncStatus{font-size:11px}
}

.pilot-ownership{flex:0 0 auto;display:block;text-align:center;padding:7px 12px;background:#0b2430;color:#bcd0db;font-size:11px;line-height:1.4;border-top:1px solid #38515f}.pilot-ownership strong,.pilot-ownership span{display:block}#gate .pilot-ownership{margin:20px -10px -10px;background:transparent;border-radius:8px}@media(max-width:700px){.pilot-ownership{font-size:10px;padding:5px 10px}}
@media screen and (max-width:600px){
 .pilot-vessel-account #toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:5px 8px;padding:8px 12px}
 .pilot-vessel-account #accountLabel{grid-column:1;grid-row:1;width:auto;font-size:15px}
 .pilot-vessel-account #syncStatus{grid-column:1;grid-row:2;min-width:0;font-size:10px;overflow-wrap:anywhere}
 .pilot-vessel-account #syncNow{grid-column:2;grid-row:1/3;min-height:44px}
 .pilot-vessel-account #logout{grid-column:3;grid-row:1/3;min-height:44px}
 .pilot-vessel-account #toolbar small{grid-column:1/-1;font-size:9px}
 .pilot-vessel-account #toolbar #conflictButton,.pilot-vessel-account #toolbar #localBackup{grid-column:1/-1;min-height:44px}
 .pilot-vessel-account #onlineInfo{font-size:10px;line-height:1.4;padding:6px 12px}
 #gate{width:auto!important;max-width:none!important;margin:20px 12px!important;padding:22px!important;transform:none!important}
 #gate input,#gate select{font-size:16px;min-height:48px}
 #gate button{min-height:48px}
 dialog{max-width:calc(100vw - 16px);padding:14px;max-height:92dvh}
 .dialogHead h2{font-size:19px}
}
/* Daily recovery and handheld administrator controls. */
#adminMoreTools{display:none}
#dailyArchive{width:min(1100px,96vw)}
.archive-controls{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:12px;align-items:end}
.archive-controls input,.archive-controls select{margin-bottom:0}
.archive-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:16px 0}
.archive-day{text-align:left;min-height:48px}
.archive-rows{max-width:100%;overflow:auto;max-height:45dvh}
.archive-rows table{border-collapse:collapse;min-width:780px;width:100%}
.archive-rows td,.archive-rows th{padding:10px;text-align:left;border-bottom:1px solid #416776}
.archive-rows input[type=checkbox],#archiveConfirm{display:inline-block;width:24px;height:24px;vertical-align:middle;margin:8px}
#archiveRestoreControls{margin-top:16px;display:grid;gap:12px}
#archiveRestoreControls button{justify-self:start;min-height:44px}
@media screen and (max-width:1100px), screen and (pointer:coarse) and (max-width:1400px){
 .pilot-admin-account #toolbar button,dialog button{min-height:44px}
 dialog{width:calc(100vw - 20px);max-width:1000px;max-height:92dvh;overflow:auto;box-sizing:border-box}
 dialog input,dialog select{min-width:0;font-size:16px}
 dialog .row span{min-width:0;flex-basis:100%;overflow-wrap:anywhere}
 dialog .row{gap:8px}dialog .row button{flex:1 1 auto}
 .archive-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 .archive-controls>*{min-width:0}
 #adminDialog section{margin-bottom:24px}#adminDialog section>button{margin:5px 0;max-width:100%;white-space:normal}
 #auditList,#securityStatus{overflow-wrap:anywhere}
}
@media screen and (max-width:600px){
 .pilot-admin-account #toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px}
 .pilot-admin-account #accountLabel,.pilot-admin-account #syncStatus{grid-column:1/-1;min-width:0;width:auto;overflow-wrap:anywhere}
 .pilot-admin-account #toolbar #syncNow{grid-column:1;grid-row:3}
 .pilot-admin-account #toolbar #manage{grid-column:2;grid-row:3}
 .pilot-admin-account #toolbar #logout{grid-column:3;grid-row:3}
 .pilot-admin-account #toolbar button{font-size:13px;min-width:0}
 .pilot-admin-account #adminMoreTools{display:block;grid-column:1/-1}
 .pilot-admin-account:not(.pilot-admin-tools-open) #toolbar button:not(#syncNow):not(#manage):not(#logout):not(#adminMoreTools):not(#conflictButton){display:none!important}
 .pilot-admin-account #toolbar small,.pilot-admin-account #toolbar #conflictButton{grid-column:1/-1}
 .pilot-admin-account #onlineInfo{font-size:10px;padding:5px 10px}
 .archive-days{grid-template-columns:minmax(0,1fr)}
 .archive-controls label:first-child{grid-column:1/-1}
 .archive-controls button{grid-column:1/-1}
 .dialogHead{gap:10px;align-items:start}.dialogHead h2{margin-top:6px;overflow-wrap:anywhere}
 #archiveRestoreControls button{width:100%}
}
@media screen{
 html.pilot-static-scene body:has(>#gate:not([hidden])){background-color:#0a202b;background-image:linear-gradient(90deg,rgba(3,16,27,.50),rgba(5,24,37,.02) 72%),url('/brand/norwind-helm-photo.jpg')!important;background-position:center center!important;min-height:100svh}
}
@media screen and (min-width:1000px){
 html.pilot-static-scene body:has(>#gate:not([hidden])){--login-photo-width:min(max(100vw,196.32vh),calc((94vw - 464px)*2));--login-photo-left:calc(6vw + 464px - var(--login-photo-width)/4);background-image:linear-gradient(90deg,#0a202b 0,#0a202b var(--login-photo-left),rgba(3,16,27,.35) calc(var(--login-photo-left) + 160px),rgba(5,24,37,.02) 72%),url('/brand/norwind-helm-photo.jpg')!important;background-size:100% 100%,var(--login-photo-width) auto!important;background-position:center center,var(--login-photo-left) center!important;background-repeat:no-repeat!important}
 html.pilot-static-scene #gate{margin:7vh 0 5vh 6vw!important}}
@media screen and (max-width:999px){
 html.pilot-static-scene body:has(>#gate:not([hidden])){background-image:linear-gradient(to bottom,transparent 150px,#0a202b 320px),url('/brand/norwind-helm-photo.jpg')!important;background-size:100% 420px,max(100vw,628px) auto!important;background-position:center top!important;background-repeat:no-repeat!important;background-attachment:scroll!important;display:flow-root}
 html.pilot-static-scene #gate{margin:270px auto 20px!important;width:calc(100% - 24px)!important;max-width:480px!important}
}
#dailyArchive .dialogHead,#adminDialog .dialogHead{position:sticky;top:-14px;z-index:3;background:#12323f;padding:8px 0;border-bottom:1px solid #416776}



#gate .pilot-ownership{margin:18px 0 0;padding:15px 0 0;border-radius:0;color:#dceaf0;font-size:13px;line-height:1.6}#gate .pilot-ownership strong{display:block;font-size:17px;color:#fff;font-weight:700}#gate .pilot-ownership small{display:block;margin-top:4px;font-size:11px;color:#bcd0db}

/* Compact toolbar: keep all actions together, with version after them. */
@media screen and (max-width:600px){.pilot-admin-account #toolbar small{order:100}.pilot-admin-account #toolbar #adminMoreTools{order:99}.pilot-admin-account #toolbar{gap:5px;padding:7px}.pilot-admin-account #toolbar button{padding:6px;line-height:1.2}}

/* Keep phone workspace actions focused on operations and help. */
@media screen and (max-width:600px){#toolbar .pilot-install{display:none!important}#toolbar #quickGuide{min-height:44px}}

@media screen and (max-width:1100px), screen and (pointer:coarse) and (max-width:1400px){#openDailyArchive{display:none!important}}
