:root {
  color-scheme:light;
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;
  color:#14243f;
  background:#f6f9fd;
  font-synthesis:none;
  font-size:14px;
  --line:#e3ebf5;
  --muted:#7687a3;
  --blue:#1264ea
}
* {
  box-sizing:border-box
}
[hidden] {
  display:none!important
}
body {
  margin:0
}
button,input,select {
  font:inherit
}
a {
  color:inherit;
  text-decoration:none
}
svg {
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0
}
.svg-defs {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:210px;
  background:linear-gradient(150deg,#162b46,#13243b);
  color:#bfccdd;
  display:flex;
  flex-direction:column;
  padding:24px 12px;
  z-index:30
}
.brand {
  display:flex;
  align-items:center;
  flex-direction:column;
  gap:10px;
  color:#77d8ff;
  font-size:15px;
  letter-spacing:2px;
  padding:0 0 34px
}
.brand svg {
  width:48px;
  height:48px
}
.sidebar nav {
  display:grid;
  gap:12px
}
.sidebar nav a {
  display:flex;
  align-items:center;
  gap:18px;
  padding:17px 19px;
  border-radius:9px;
  font-size:17px
}
.sidebar nav a:hover {
  background:#ffffff0b
}
.sidebar nav a[aria-current] {
  background:#245294;
  color:#fff;
  box-shadow:0 4px 12px #081d3826
}
.sidebar nav a[aria-current] svg {
  color:#64d8ff
}
.sidebar-footer {
  margin-top:auto;
  padding:16px;
  display:flex;
  gap:12px;
  align-items:center;
  font-size:12px
}
.sidebar-footer i {
  width:8px;
  height:8px;
  border-radius:50%;
  background:#9baec8
}
.app-shell {
  margin-left:210px;
  padding:34px;
  max-width:1900px;
  min-height:100vh
}
.topbar {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:28px
}
.eyebrow {
  font-size:12px;
  color:var(--muted);
  letter-spacing:1.2px;
  margin-bottom:12px
}
h1 {
  font-size:32px;
  letter-spacing:.5px;
  margin:0;
  line-height:1.3
}
h2 {
  font-size:18px;
  margin:0;
  font-weight:650
}
p {
  color:var(--muted);
  line-height:1.6
}
.topbar p {
  margin:10px 0 0;
  font-size:15px
}
.actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
  padding-top:2px
}
#saveStatus {
  font-size:12px;
  color:#648276;
  max-width:260px;
  line-height:1.5
}
button,.import-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 14px;
  border:1px solid #d5dfed;
  border-radius:7px;
  background:white;
  color:#183456;
  cursor:pointer;
  white-space:nowrap
}
button:hover,.import-button:hover {
  background:#edf4ff;
  border-color:#a8c8f6
}
button:disabled {
  opacity:.45;
  cursor:wait
}
.primary {
  background:var(--blue);
  color:white;
  border-color:var(--blue)
}
.primary:hover {
  background:#0954ce;
  color:white
}
.import-button {
  position:relative;
  overflow:hidden
}
.import-button input {
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
  width:100%;
  height:100%
}
.import-button:focus-within {
  outline:2px solid var(--blue);
  outline-offset:3px
}
a:focus-visible,button:focus-visible {
  outline:2px solid var(--blue);
  outline-offset:3px
}
.summary-grid {
  display:grid;
  grid-template-columns:minmax(260px,1fr) minmax(560px,2fr);
  gap:18px;
  margin-bottom:20px
}
.total-card,.recency-card,.stats-panel,.entry-card,.table-panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:11px
}
.total-card {
  padding:26px
}
.metric-heading {
  display:flex;
  align-items:center;
  gap:14px
}
.icon-tile {
  width:52px;
  height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#edf5ff;
  color:#0870ff;
  border-radius:50%;
  flex-shrink:0
}
.icon-tile svg {
  width:28px;
  height:28px
}
#totalExperienceTime {
  font-size:clamp(32px,3.3vw,46px);
  letter-spacing:1px;
  display:block;
  margin:22px 0 4px 66px;
  font-variant-numeric:tabular-nums
}
.total-card>p {
  margin:0 0 12px 66px
}
.recency-card {
  padding:24px;
  display:grid;
  grid-template-columns:minmax(230px,1fr) minmax(260px,1.15fr);
  gap:24px;
  min-height:274px
}
.recency-details .metric-heading {
  gap:12px;
  flex-wrap:wrap
}
.status-badge {
  background:#dff8e9;
  color:#168148;
  border-radius:7px;
  padding:7px 10px;
  font-size:13px;
  white-space:nowrap
}
.expiry {
  margin-top:22px;
  background:#edf4ff;
  border-radius:9px;
  padding:18px 22px;
  color:#194ed4
}
.expiry>span {
  display:block;
  font-size:14px;
  margin-bottom:7px;
  color:#5772a5
}
.expiry>strong {
  font-size:clamp(24px,2.5vw,36px);
  font-variant-numeric:tabular-nums;
  white-space:nowrap
}
.is-warning {
  background:#fff2de;
  color:#a76309
}
.expiry.is-warning>span {
  color:#a76309
}
.stats-grid {
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:18px
}
.stats-panel {
  padding:23px
}
.stats-panel h2 {
  margin-bottom:18px
}
.stats-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
  border:1px solid var(--line);
  border-radius:7px;
  overflow:hidden
}
.stats-table th {
  background:#f0f5fb;
  color:#597093;
  font-size:13px;
  font-weight:500
}
.stats-table td,.stats-table th {
  padding:11px 16px;
  text-align:left;
  border-bottom:1px solid #edf1f7;
  font-variant-numeric:tabular-nums;
  white-space:nowrap
}
.stats-table tbody tr:last-child td {
  border-bottom:0
}
.stats-table tbody tr:hover {
  background:#f8fbff
}
.recent-table .stats-table td,.recent-table .stats-table th {
  padding:10px 12px;
  font-size:12px
}
.recent-table p {
  font-size:12px
}
.entry-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:20px
}
.entry-card {
  display:flex;
  gap:22px;
  padding:24px;
  transition:border-color .15s,background .15s
}
.entry-card:hover {
  border-color:#bdd3f1;
  background:#fcfdff
}
.entry-card .icon-tile {
  border-radius:12px
}
.entry-card p {
  margin:8px 0 16px;
  font-size:14px
}
.entry-card div>span {
  color:var(--blue);
  font-size:14px
}
.view-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:12px 0 18px
}
.view-toolbar>div {
  display:flex;
  gap:10px
}
.section-title {
  padding:18px 20px;
  border-bottom:1px solid var(--line);
  font-size:16px
}
.table-panel {
  overflow:hidden;
  min-width:0
}
.table-wrap {
  overflow:auto;
  max-height:calc(100vh - 270px);
  min-height:100px
}
.table-wrap table {
  border-collapse:separate;
  border-spacing:0;
  min-width:1240px;
  width:100%
}
.table-wrap .simulator-table {
  min-width:780px
}
.table-wrap th {
  position:sticky;
  top:0;
  z-index:2;
  background:#eef4fb;
  font-weight:500;
  color:#537098;
  white-space:nowrap;
  font-size:13px;
  padding:12px 8px
}
.table-wrap td {
  padding:6px;
  border-bottom:1px solid #edf1f7;
  min-width:75px
}
.table-wrap tr:nth-child(even) {
  background:#fafcff
}
.table-wrap tr:hover {
  background:#f3f8ff
}
input,select {
  min-width:0;
  width:100%;
  height:34px;
  padding:5px 7px;
  border:1px solid transparent;
  border-radius:5px;
  background:transparent;
  color:#213754;
  outline:none
}
input:hover,select:hover {
  border-color:#d9e4f3
}
input:focus,select:focus {
  border-color:#6ba5f6;
  background:white;
  box-shadow:0 0 0 2px #e3efff
}
input[type=date] {
  min-width:135px
}
input[type=time] {
  min-width:102px
}
input[data-field=notes] {
  min-width:145px
}
output {
  display:block;
  min-width:64px;
  padding:8px;
  text-align:center;
  border-radius:5px;
  font-variant-numeric:tabular-nums
}
output[data-field=flightTime],output[data-field=trainingTime] {
  background:#e7f8f0;
  color:#246b56
}
input[data-field=experienceTime] {
  background:#fff4df;
  min-width:76px
}
.icon-button {
  color:#bc6470;
  border-color:transparent;
  background:transparent;
  font-size:20px;
  min-height:30px;
  padding:2px 10px
}
.compact-toggle {
  font-size:12px;
  padding:5px 8px;
  min-height:28px
}
.collapse-column {
  min-width:88px
}
@media(min-width:1700px) {
  .summary-grid {
    grid-template-columns:1fr 2fr
  }
  .recency-card {
    min-height:290px
  }
}
@media(max-width:1250px) {
  .sidebar {
    width:175px
  }
  .sidebar nav a {
    padding:16px 12px;
    gap:12px;
    font-size:15px
  }
  .app-shell {
    margin-left:175px;
    padding:24px
  }
  .summary-grid {
    grid-template-columns:1fr
  }
  .total-card {
    display:flex;
    align-items:center;
    gap:24px;
    padding:20px 24px
  }
  #totalExperienceTime {
    margin:0
  }
  .total-card>p {
    margin:0
  }
  .recency-card {
    min-height:230px
  }
  .topbar {
    flex-wrap:wrap
  }
  .actions {
    justify-content:flex-start
  }
}
@media(max-width:760px) {
  .sidebar {
    width:72px;
    padding:18px 7px
  }
  .brand {
    padding-bottom:25px
  }
  .brand svg {
    width:35px;
    height:35px
  }
  .brand span,.sidebar nav span,.sidebar-footer {
    display:none
  }
  .sidebar nav a {
    padding:15px;
    justify-content:center
  }
  .app-shell {
    margin-left:72px;
    padding:18px 14px
  }
  h1 {
    font-size:25px
  }
  .stats-grid,.entry-grid,.recency-card {
    grid-template-columns:1fr
  }
  .recency-card {
    gap:20px;
    padding:18px
  }
  .summary-grid {
    grid-template-columns:minmax(0,1fr)
  }
  .total-card {
    display:block;
    padding:20px
  }
  #totalExperienceTime {
    margin:16px 0 4px
  }
  .total-card>p {
    margin:0
  }
  .stats-panel {
    padding:16px
  }
  .entry-card {
    padding:20px;
    gap:14px
  }
  .view-toolbar {
    flex-wrap:wrap
  }
  .stats-table th,.stats-table td {
    padding:10px
  }
  .actions {
    gap:8px
  }
  #saveStatus {
    flex-basis:100%
  }
  .table-wrap {
    max-height:65vh
  }
  .expiry>strong {
    font-size:32px
  }
}

/* Cloud account and import controls, retaining the existing dashboard. */
[hidden] { display: none !important; }
.auth-panel { min-height:100vh; display:grid; place-items:center; padding:24px; }
.auth-panel form { width:min(420px,100%); padding:32px; border:1px solid #dfe8f5; border-radius:16px; background:white; box-shadow:0 16px 60px #16385a12; }
.auth-panel h1 { font-size:30px; }.auth-panel label {display:block;margin:20px 0;}
.auth-panel input {display:block;width:100%;margin-top:8px;padding:12px;font-size:16px;border:1px solid #cbd8ec;border-radius:8px;}
.auth-panel button {width:100%;padding:12px;}.auth-panel p {color:#566b91;line-height:1.6;}
#saveStatus {max-width:390px;line-height:1.5;}#userEmail {font-size:13px;color:#607397;}
.save-error {background:#fff1ec !important;}.save-error input,.save-error select {border-color:#e4a18b;}
dialog {width:min(1000px,92vw);max-height:85vh;border:1px solid #dce7f5;border-radius:16px;padding:24px;color:#10254a;}
dialog::backdrop {background:#10254270;}.import-table-wrap {max-height:55vh;overflow:auto;margin:20px 0;}.import-table-wrap td {white-space:normal;overflow-wrap:anywhere;min-width:70px;} .import-table-wrap td:nth-child(3){min-width:300px;}
#flightPanel table {min-width:1550px;}input[data-field="departure"],input[data-field="arrival"]{width:80px;}input[data-field="registration"]{width:110px;}
@media(max-width:768px){.table-wrap input,.table-wrap select{font-size:16px;} .topbar .actions{gap:8px;}.auth-panel form{padding:24px;}}
.more-actions {position:relative;font-size:13px;}.more-actions summary{cursor:pointer;padding:9px 12px;border:1px solid #dce7f5;border-radius:8px;background:white;}.more-actions>div{position:absolute;right:0;top:42px;width:180px;padding:10px;background:white;box-shadow:0 8px 30px #17335c25;z-index:30;border-radius:10px;display:grid;gap:8px;}
