*{box-sizing:border-box}body{margin:0;background:#08111b;color:#eef4ff;font:16px system-ui,sans-serif}header,main{max-width:1100px;margin:auto;padding:16px}header{font-size:25px;color:#39b6f7}header b{color:white}small{display:block;font-size:12px;color:#b6c8da}main{padding-bottom:100px}.notice{font-size:12px;color:#f1c78b}.hero{position:relative;aspect-ratio:1130/383;background:url('assets/hero.png') center/contain no-repeat;border:1px solid #263b4d;border-radius:20px;overflow:hidden}strong{display:block;font-size:clamp(18px,3vw,36px)}article{background:#142433;border:1px solid #263b4d;border-radius:18px;padding:16px;margin:10px 0}.stats,.fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}h2{font-size:20px;margin:0 0 12px}button{background:#086ac1;color:white;border:1px solid #2995e8;border-radius:10px;padding:12px;font:inherit;cursor:pointer}#add,form>button{width:100%;margin:6px 0}nav{position:fixed;bottom:0;left:0;right:0;background:#0c1927;display:flex;justify-content:space-around;border-top:1px solid #263b4d}nav button{background:none;border:0;font-size:13px}label{display:block;margin:8px 0;color:#c8d7e7}input:not([type=checkbox]),select,textarea{display:block;width:100%;padding:10px;background:#0e1d2c;color:white;border:1px solid #40576d;border-radius:7px;font:inherit}textarea{min-height:80px}#error{color:#ff9b9b}.flight{padding:12px 0;border-top:1px solid #304456}.flight span{float:right}.bars{display:flex;align-items:end;height:110px;gap:10px}.bar{flex:1;text-align:center;font-size:11px}.bar i{display:block;background:#278ad1;border-radius:5px 5px 0 0;min-height:2px}[hidden]{display:none!important}

#standardTable{overflow:auto}.standard{border-collapse:collapse;font-size:11px;color:#203d32;width:100%}.standard td,.standard th{border:1px solid #416b55;padding:4px;white-space:normal}.standard.green td{background:#d5f3df}.standard.green td:nth-child(even){background:#c1e4cf}.standard.green th{background:#d5f3df}.standard.white td,.standard.white th{background:white;color:black}.standard.white td:nth-child(even){background:#e9edf0}@media print{@page{size:A3 landscape;margin:10mm}body.standard-print{background:white;color:black}body.standard-print header,body.standard-print nav,body.standard-print main>p,body.standard-print main>section:not(#Reports),body.standard-print #Reports>*:not(#standardPanel),body.standard-print #standardPanel>*:not(#standardTable){display:none!important}body.standard-print #standardTable{overflow:visible}body.standard-print .standard{font-size:8px;print-color-adjust:exact;-webkit-print-color-adjust:exact}body.standard-print tr{break-inside:avoid}}
@media print{body.standard-print .report-sheet{break-before:page}body.standard-print .report-sheet:first-child{break-before:auto}body.standard-print main{max-width:none;padding:0}body.standard-print .standard thead{display:table-header-group}}
/* Responsive safeguards; preserve locked artwork and palette. */
.fields,.stats{grid-template-columns:repeat(auto-fit,minmax(min(130px,100%),1fr))}
.fields>*,.stats>*,section,article{min-width:0}
input,select,textarea{min-width:0;max-width:100%}
nav button{min-width:0;flex:1;padding:12px 4px;overflow-wrap:anywhere}
nav{padding-bottom:env(safe-area-inset-bottom,0px)}
main{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
.flight,article,label{overflow-wrap:anywhere}
@media(max-width:420px){header,main{padding-left:12px;padding-right:12px}nav button{font-size:12px}}

label > :is(input:not([type=checkbox]), select, textarea) {
  margin-block-start: 4px;
}
.fields > label:has(> :is(input:not([type=checkbox]), select, textarea)) {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
}
.fields > label > :is(input:not([type=checkbox]), select, textarea) {
  margin-block-start: 0;
  min-block-size: 43px;
}
.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 12px;
}
.action-row > button { min-block-size: 46px; }
.action-row > button:disabled { opacity: .55; cursor: default; }
.empty-flights { margin: 16px 0 0; color: #b6c8da; }
.account-link { color: #9bdcff; margin-inline-end: 8px; text-underline-offset: 3px; }
.qualification-cards, .report-comparison, .report-metrics { display: grid; gap: 10px; }
.qualification-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qualification-cards article { padding: 12px; margin: 0; }
.qualification-cards h3, .report-comparison h3 { margin: 0 0 8px; font-size: 1rem; }
.qualification-cards strong { font-size: 1rem; }
.qualification-cards strong[data-expiry="expired"] { color: #ff9b9b; }
.qualification-cards strong[data-expiry="soon"] { color: #f1c78b; }
.qualification-cards small { margin-top: 4px; }
.report-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 12px 20px; }
.report-comparison section { background: #142433; border: 1px solid #263b4d; border-radius: 16px; padding: 12px; }
.report-metrics { grid-template-columns: repeat(auto-fit, minmax(min(118px, 100%), 1fr)); margin: 0; }
.report-metrics > div { background: #0e1d2c; border: 1px solid #304456; border-radius: 10px; padding: 9px; }
.report-metrics dt { color: #c8d7e7; font-size: .82rem; }
.report-metrics dd { margin: 3px 0 0; font-size: 1.12rem; font-weight: 650; font-variant-numeric: tabular-nums; }
#dutyResults { font-size: 1.35rem; }
#dutyResults + p { margin-bottom: 0; }
#database > button { margin: 0 6px 8px 0; }

select {
  appearance: none;
  padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23c8d7e7' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
@media (forced-colors: active) {
  select { appearance: auto; background-image: none; }
}
textarea.pairing-input {
  min-block-size: 43px;
  field-sizing: content;
  resize: vertical;
}
#simList article > button:first-of-type { margin-inline-start: 10px; }
:is(#simList, #qualList, #dutyList, #dhList) button + button { margin-inline-start: 8px; }
:is(#simList, #qualList, #dutyList, #dhList) article > button { margin-block-start: 8px; }
#allocationHelp { margin-block: 6px 12px; }
.roster-source { margin-block: 16px; }
.roster-source details { margin-block-start: 16px; }
.roster-source summary { color: #9bdcff; cursor: pointer; }
#standardPreview { margin-block-end: 12px; }
#standardPanel { margin-block-end: 18px; }

.hero-card {
  --hero-tile-inset: 12px;
  --hero-tile-gap: 8px;
  border: 1px solid #263b4d;
  border-radius: 20px;
  overflow: hidden;
}
.hero-card .hero { border: 0; border-radius: 0; }
.hero-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  background: #142433;
}
.hero-footer button { padding: 7px 10px; }
:root[data-theme="light"] { color-scheme: light; }
[data-theme="light"] body { background: #f1f6fb; color: #152b40; }
[data-theme="light"] header { color: #0963a1; }
[data-theme="light"] header b { color: #152b40; }
[data-theme="light"] label,
[data-theme="light"] small,
[data-theme="light"] .empty-flights,
[data-theme="light"] .report-metrics dt { color: #39566d; }
[data-theme="light"] .notice { color: #805514; }
[data-theme="light"] :is(article, .hero-footer, .report-comparison section, nav) {
  background: #fff;
  border-color: #b9cddd;
}
[data-theme="light"] :is(input:not([type=checkbox]), select, textarea, .report-metrics > div) {
  background-color: #f8fbff;
  border-color: #9db6cb;
  color: #152b40;
}
[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%2339566d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="light"] nav button,
[data-theme="light"] .account-link,
[data-theme="light"] .roster-source summary { color: #075b93; }
[data-theme="light"] .qualification-cards strong[data-expiry="expired"],
[data-theme="light"] #error { color: #9f2828; }
[data-theme="light"] .qualification-cards strong[data-expiry="soon"] { color: #805514; }


.theme-controls {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-block-end: 4px;
}
.theme-controls button {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: #ffd45c;
  font-size: 1.15rem;
  line-height: 1;
}
.theme-controls button[aria-pressed="true"] {
  background: #142433;
  border-color: #40576d;
  color: #ffd45c;
}
[data-theme="light"] .theme-controls button { color: #986500; }
[data-theme="light"] .theme-controls button[aria-pressed="true"] {
  background: #fff;
  border-color: #9db6cb;
  color: #986500;
}
.sim-crew { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.sim-crew > label { justify-content: flex-start; }

.duty-track { margin-block: 10px; }
.duty-track > span { display: block; margin-bottom: 4px; font-size: .85rem; }
.duty-bar { display: flex; min-height: 12px; border-radius: 6px; overflow: hidden; background: #3b5165; }
.duty-bar .duty-used { background: #0b87d6; }
.duty-bar .duty-limit { background: #e0af44; }
.duty-bar .duty-over { background: #df5b65; }
[data-theme="light"] .duty-bar { background: #d1dce7; }

input[data-time]::placeholder { color: #8397ad; opacity: 1; }
[data-theme="light"] input[data-time]::placeholder { color: #617589; }

main > .notice { margin: 0 0 3px; }
header { padding-block-end: 6px; }
main { padding-block-start: 6px; }
.account-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-block-end: 14px; }
.owner-card { border: 1px solid #40576d; border-radius: 12px; padding: 12px; margin-block: 12px 16px; }
.owner-card summary { cursor: pointer; font-weight: 650; }
.owner-card summary strong { display: inline; font-size: 1rem; margin-inline-start: 6px; }
.crew-slot { margin: 0 0 10px; border: 1px solid #40576d; border-radius: 10px; }
.crew-slot legend { padding-inline: 4px; color: inherit; }
.swap-crew { margin-block: 0 10px; }

.flight-card {
  --flight-date-width: clamp(68px, 15vw, 82px);
  --flight-card-gap: 10px;
  --flight-content-offset: calc(var(--flight-date-width) + var(--flight-card-gap));
  display: grid;
  grid-template-columns: var(--flight-date-width) minmax(0, 1fr);
  gap: var(--flight-card-gap);
  width: 100%;
  margin-block: 8px;
  padding: 10px;
  text-align: left;
  background: #101e2d;
  border: 1px solid #304456;
  color: #eef4ff;
  font-variant-numeric: tabular-nums;
}
.flight-card:hover { border-color: #62b5e8; }
.flight-card-date { align-self: center; border-inline-end: 1px solid #304456; }
.flight-card-date strong { font-size: clamp(2rem, 5.5vw, 2.65rem); line-height: 1.05; color: #f5bc20; }
.flight-card-meta, .flight-card-trail { font-size: .77rem; color: #b6c8da; }
.flight-card-date > span { display: block; margin-top: 3px; font-size: 1rem; line-height: 1.15; color: #b6c8da; }
.flight-card-body { display: grid; gap: 5px; min-width: 0; }
.flight-card-times { display: grid; grid-template-columns: 4ch minmax(0, 1fr) 4ch; align-items: center; gap: 6px; font-size: .78rem; }
.flight-card-times > span:last-child { text-align: end; }
.flight-card-times > span:nth-child(2) { text-align: center; border-inline: 1px solid #40576d; padding-inline: 4px; }
.flight-card-route { font-size: clamp(1.05rem, 3vw, 1.42rem); overflow-wrap: anywhere; }
.flight-card-meta { overflow-wrap: anywhere; }
.flight-card-trail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 4px 6px;
  align-items: start;
  padding-inline-start: var(--flight-content-offset);
}
.flight-card-remarks {
  grid-column: 1;
  margin-inline-start: calc(-1 * var(--flight-content-offset));
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}
.flight-card-day-night { grid-column: 2; text-align: center; }
.flight-card-movements { grid-column: 3; text-align: end; overflow-wrap: anywhere; }
.flight-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 10px; }
.flight-detail-grid article { margin: 0; }
.flight-detail-head h3, .flight-detail-group h3 { margin: 0 0 8px; }
.flight-detail-head p { margin: 0; }
.flight-detail-list { margin: 0; }
.flight-detail-list > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding-block: 6px; border-bottom: 1px solid #40576d; }
.flight-detail-list > div:last-child { border-bottom: 0; }
.flight-detail-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.flight-remarks { white-space: pre-wrap; margin-bottom: 0; }
.detail-actions { display: flex; gap: 10px; }
.detail-delete { display: block; margin-block-start: 18px; background: transparent; border-color: #a74d55; color: #ffacb1; }
.duty-endpoints { display: flex; justify-content: space-between; gap: 6px; font-size: .75rem; margin-top: 4px; }
.duty-endpoints span:last-child { text-align: right; }
[data-theme="light"] .flight-card { background: #f8fbff; color: #152b40; border-color: #9db6cb; }
[data-theme="light"] :is(.flight-card-date > span,.flight-card-meta,.flight-card-trail) { color: #39566d; }
[data-theme="light"] .flight-card-date strong { color: #986500; }
[data-theme="light"] .detail-delete { color: #9f2828; }


.landing-activity {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
 gap: 12px;
 margin-bottom: 20px;
}
.landing-activity > section {
 border: 1px solid currentColor;
 border-radius: 12px;
 padding: 12px;
}
.landing-activity h3 { margin: 0 0 10px; }
.landing-activity .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#reportStartField[hidden] { display: none; }


.flight-detail-crew p { margin: 0 0 6px; }
.flight-detail-logged-role { font-weight: 700; }
.flight-detail-crew-list { list-style: none; margin: 0; padding: 0; }
.flight-detail-crew-list li { padding-block: 5px; overflow-wrap: anywhere; }


.allowance-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 12px; }
.allowance-card h3 { margin: 0 0 8px; }
.allowance-card .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.allowance-total { margin: 0 0 16px; font-size: 1.25rem; font-weight: 700; }
.allowance-card details { margin-top: 12px; }


.allowance-total-ready { color: #72e6a0; }
[data-theme="light"] .allowance-total-ready { color: #166534; }
.allowance-card summary { cursor: pointer; }
.allowance-rotations { display: grid; gap: 10px; list-style: none; margin: 10px 0 0; padding: 0; }
.allowance-rotations li { border: 1px solid #40576d; border-radius: 10px; padding: 10px; }
.allowance-rotations p { margin: 4px 0 8px; font-size: .85rem; }
.allowance-rotations dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.allowance-rotations dt { font-size: .8rem; }
.allowance-rotations dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
:is(input[type="date"], input[type="month"])::-webkit-calendar-picker-indicator {
 filter: brightness(0) invert(1);
 cursor: pointer;
}
[data-theme="light"] :is(input[type="date"], input[type="month"])::-webkit-calendar-picker-indicator {
 filter: brightness(0) invert(1) drop-shadow(0 0 1px #203448) drop-shadow(0 0 1px #203448);
}


.flight-card-times > span:nth-child(2),
.flight-card-day-night,
.flight-card-movements { font-size: clamp(.9rem, 2.6vw, 1.05rem); font-weight: 650; }
.flight-card-scheduled .flight-card-date strong { color: #f03232; }
[data-theme="light"] .flight-card-scheduled .flight-card-date strong { color: #b5121b; }



.qualification-cards article > button { display: block; margin-top: 8px; }


#qualificationOther[hidden] { display: none; }
.qualification-cards h3,
.qualification-cards strong { font-size: clamp(1.05rem, 3vw, 1.42rem); overflow-wrap: anywhere; }
.qualification-cards time {
 display: block;
 margin-top: 5px;
 font-size: clamp(1.14rem, 3.5vw, 1.65rem);
 font-weight: 750;
}
.qualification-cards [data-expiry="valid"] :is(strong,time) { color: #72e6a0; }
.qualification-cards [data-expiry="soon"] :is(strong,time) { color: #f5bc20; }
.qualification-cards [data-expiry="expired"] :is(strong,time) { color: #ff9b9b; }
[data-theme="light"] .qualification-cards [data-expiry="valid"] :is(strong,time) { color: #166534; }
[data-theme="light"] .qualification-cards [data-expiry="soon"] :is(strong,time) { color: #986500; }
[data-theme="light"] .qualification-cards [data-expiry="expired"] :is(strong,time) { color: #9f2828; }

#historyTotalField[hidden] { display: none; }
#historyParts fieldset { margin-block: 12px; min-inline-size: 0; }


.hero-pic {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: var(--hero-tile-gap);
 padding: 10px var(--hero-tile-inset);
 background: #142433;
}
.hero-pic > div {
 min-width: 0;
 padding: 8px;
 border: 1px solid #40576d;
 border-radius: 10px;
 background: #0e1d2c;
 font-size: .85rem;
}
[data-theme="light"] .hero-pic > div { background: #fff; border-color: #b9cbd9; }
.hero-pic strong { font-size: clamp(1rem, 3.7vw, 1.75rem); font-variant-numeric: tabular-nums; }
[data-theme="light"] .hero-pic { background: #edf4fa; }
#actualImportReview .import-missing { color: #f5bc20; }
#actualImportReview .import-missing :is(input, select) { border-color: #a67724; }
#actualImportReview .import-needs-review { border-color: #a67724; }
[data-theme="light"] #actualImportReview .import-missing { color: #805514; }

#nightTimeWarning:empty { display: none; }
#nightTimeWarning { color: #ff9b9b; }
[data-theme="light"] #nightTimeWarning { color: #9f2828; }

.career{position:absolute;left:var(--hero-tile-inset);bottom:6%;width:calc((100% - 2 * var(--hero-tile-inset) - 2 * var(--hero-tile-gap)) / 3);height:24%;background:rgb(13 25 40 / 78%);border:1px solid #263b4d;border-radius:15px;padding:1% 3%;font-size:clamp(9px,1.6vw,18px)}
[data-theme="light"] .career { color: #eef4ff; }
@media(max-width:420px){
 .career{border-radius:8px;padding:0 2%;line-height:1.1}
 .career strong{font-size:clamp(12px,4vw,18px)}
}

.movement-suggestions:empty { display: none; }
.movement-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px; }
.movement-suggestions > button { padding: 7px 10px; }

.app-bottom {
 position: fixed;
 inset: auto 0 0;
 background: #0c1927;
 padding-bottom: env(safe-area-inset-bottom, 0px);
}
.app-bottom nav { position: static; padding-bottom: 0; }
.app-copyright {
 padding: 0 8px 7px;
 text-align: center;
 font-size: .75rem;
 color: #b6c8da;
}
[data-theme="light"] .app-bottom { background: #edf4fa; }
[data-theme="light"] .app-copyright { color: #39566d; }
@media print { .app-bottom { display: none; } }

.brand-header {
 display: flex;
 align-items: flex-start;
 gap: .35em;
}
.brand-header b { display: block; }
.brand-plane { flex: none; }

.auth-home { width: min(100%, 75rem); margin-inline: auto; }
.auth-home .brand-header { margin-bottom: 1rem; }
.auth-actions { display: flex; gap: .65rem; margin-bottom: .65rem; }
.auth-actions button[aria-expanded="true"] { border-color: #39b9f2; }
.auth-hero { border-radius: 20px; overflow: hidden; }
.auth-home #status:empty { display: none; }
.auth-home #credentials, .auth-home #account { margin-top: 1rem; }
.auth-home #credentials { max-width: 29rem; }
.auth-home #credentials form { padding: 1rem; border: 1px solid #35516b; border-radius: 16px; }
.auth-home #credentials h2 { margin: 0; }
.auth-home #credentials label { display: grid; gap: .45rem; }
.auth-home #credentials input { width: 100%; }
.auth-home #account { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
