:root{
  --bg:#0b1220;
  --panel:rgba(15,23,42,.9);
  --panel-2:#111c31;
  --text:#e5eefc;
  --muted:#93a4bf;
  --line:rgba(148,163,184,.14);
  --accent:#38bdf8;
  --accent-2:#6366f1;
  --danger-soft:rgba(239,68,68,.14);
  --radius:18px;
  --shadow:0 20px 50px rgba(0,0,0,.32);
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  min-height:100%;
}

body{
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.11), transparent 28%),
    radial-gradient(circle at top right, rgba(99,102,241,.11), transparent 22%),
    linear-gradient(180deg, #0b1220 0%, #0a1020 100%);
}

a{
  color:#7dd3fc;
  text-decoration:none;
}

code{
  background:rgba(148,163,184,.12);
  padding:2px 6px;
  border-radius:7px;
  color:var(--text);
  font-size:12px;
}

input{
  width:100%;
  height:46px;
  padding:0 14px;
  border-radius:14px;
  border:1px solid transparent;
  background:var(--panel-2);
  color:white;
  font-size:15px;
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

input:focus{
  border-color:rgba(56,189,248,.7);
  box-shadow:0 0 0 4px rgba(56,189,248,.10);
}

button{
  border:none;
  border-radius:12px;
  cursor:pointer;
  font-weight:800;
  font-size:13px;
  transition:transform .12s ease, box-shadow .18s ease, opacity .18s ease;
}

button:hover{ transform:translateY(-1px); }
button:active{ transform:translateY(0); }
button:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

.alert{
  background:rgba(239,68,68,.10);
  color:#fecaca;
  border:1px solid rgba(239,68,68,.22);
  padding:11px 13px;
  border-radius:14px;
  margin:14px 0;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 9px;
  border-radius:999px;
  background:rgba(56,189,248,.12);
  color:#bfe9ff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  margin-bottom:8px;
}

.auth-shell{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:22px;
}

.auth-card{
  width:100%;
  max-width:420px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:24px;
  backdrop-filter:blur(10px);
}

.auth-card h1{
  margin:0 0 6px;
  font-size:26px;
}

.auth-subtitle{
  margin:0 0 18px;
  color:var(--muted);
  line-height:1.5;
}

.auth-form{
  display:grid;
  gap:8px;
}

.auth-form label{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
  margin-top:4px;
}

.auth-link{
  margin-top:14px;
  color:var(--muted);
  font-size:13px;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.pager-button{
  min-height:42px;
  padding:0 14px;
}

.btn-primary{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:white;
  box-shadow:0 12px 26px rgba(56,189,248,.16);
}

.btn-secondary,
.pager-button{
  background:#243246;
  color:white;
  border:1px solid rgba(148,163,184,.12);
}

.btn-danger{
  background:var(--danger-soft);
  color:#fecaca;
  border:1px solid rgba(239,68,68,.22);
}

.full-width{ width:100%; }

.app-shell{
  max-width:1460px;
  margin:0 auto;
  padding:24px;
  display:grid;
  grid-template-columns:360px minmax(0, 1fr);
  grid-template-areas:
    "sidebar main"
    "description description";
  gap:22px;
  align-items:stretch;
}

.main-column{
  grid-area:main;
  display:block;
}



.sidebar-card{
  grid-area:sidebar;
  padding:22px;
  position:relative;
  align-self:stretch;
  min-height:810px;
  height:810px;
  display:flex;
  flex-direction:column;
  background:rgba(15,23,42,.94);
  border:1px solid rgba(148,163,184,.18);
  border-radius:20px;
  box-shadow:0 22px 54px rgba(0,0,0,.32);
}



.workspace-card{
  min-height:810px;
  display:flex;
  flex-direction:column;
  padding:22px;
  background:rgba(15,23,42,.94);
  border:1px solid rgba(148,163,184,.18);
  border-radius:20px;
  box-shadow:0 22px 54px rgba(0,0,0,.32);
  overflow:hidden;
}

.hero-copy h1{
  margin:0 0 6px;
  font-size:26px;
  line-height:1.1;
}

.info-card{
  margin-top:0;
  padding:16px;
  border-radius:16px;
  border:1px solid rgba(148,163,184,.12);
}

.subtle-card{
  background:rgba(17,28,49,.5);
}

.cta-card{
  background:linear-gradient(180deg, rgba(56,189,248,.08), rgba(99,102,241,.08));
}

.info-card-title{
  font-size:14px;
  font-weight:900;
  margin-bottom:6px;
}

.info-card-text{
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}

.compact-auth-box{
  margin-top:0;
  margin-bottom:16px;
}

#resetButton{
  margin-top:auto;
}

.stack-form{
  margin-top:12px;
}

.auth-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.compact-auth-actions{
  margin-top:12px;
}

.link-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 12px;
  border-radius:12px;
  background:#243246;
  color:white;
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  border:1px solid rgba(148,163,184,.12);
  text-align:center;
}

.primary-link{
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  border:none;
}

.entry-form{
  display:grid;
  gap:10px;
  margin-top:16px;
  padding:16px;
  background:rgba(17,28,49,.42);
  border:1px solid rgba(148,163,184,.12);
  border-radius:16px;
}

.entry-form label{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
}

.hint{
  font-size:12px;
  color:var(--muted);
  line-height:1.55;
}

.totals{
  margin:18px 0;
  display:grid;
  gap:12px;
}

.total-card{
  padding:16px;
  border-radius:16px;
  background:linear-gradient(135deg, var(--accent), var(--accent-2));
  color:white;
  box-shadow:0 14px 28px rgba(56,189,248,.12);
}

.total-label{
  font-size:12px;
  font-weight:700;
  opacity:.94;
  margin-bottom:7px;
}

.total-value{
  font-size:34px;
  line-height:1;
  font-weight:900;
}

.stats-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.mini-stat{
  padding:14px;
  border-radius:16px;
  background:rgba(17,28,49,.72);
  border:1px solid var(--line);
}

.mini-stat.full-span{
  grid-column:1 / -1;
}

.mini-stat-label{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  margin-bottom:6px;
}

.mini-stat-value{
  font-size:24px;
  font-weight:900;
  line-height:1;
}

.workspace-header{
  margin-bottom:16px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(148,163,184,.14);
  flex-shrink:0;
}

.workspace-header h2,
.description-card h2{
  text-align:left;
}

.workspace-meta{
  color:var(--muted);
  font-size:13px;
}

.page-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
  min-height:44px;
}

.page-toolbar-center{
  text-align:center;
}

.page-label{
  font-size:18px;
  font-weight:900;
}

.page-sub{
  color:var(--muted);
  font-size:12px;
  margin-top:3px;
}

.logbook-sheet{
  border:1px solid rgba(148,163,184,.14);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(12,18,31,.98), rgba(10,15,26,.99));
  height:598px;
  display:grid;
  grid-template-rows:auto auto 1fr;
}

.sheet-header{
  padding:18px;
  border-bottom:1px solid rgba(148,163,184,.14);
  display:grid;
  gap:14px;
  background:rgba(17,28,49,.28);
}

.sheet-title{
  font-size:22px;
  font-weight:900;
  margin-bottom:4px;
}

.sheet-subtitle{
  font-size:13px;
  color:var(--muted);
}

.sheet-summary-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:10px;
}

.sheet-summary{
  padding:14px;
  border-radius:14px;
  background:rgba(17,28,49,.72);
  border:1px solid rgba(148,163,184,.12);
}

.sheet-summary-label{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  margin-bottom:6px;
}

.sheet-summary-value{
  font-size:22px;
  font-weight:900;
  line-height:1;
}

.logbook-table-head,
.logbook-table-row{
  display:grid;
  grid-template-columns:1.1fr 1.5fr .9fr 1fr;
  gap:12px;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid rgba(148,163,184,.08);
  background:transparent;
}

.logbook-table-head{
  display:grid;
  grid-template-columns:1.1fr 1.5fr .9fr 1fr;
  gap:12px;
  align-items:center;
  padding:12px 18px;
  border-bottom:1px solid rgba(148,163,184,.12);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  background:rgba(17,28,49,.18);
}

.logbook-table-body-wrap{
  overflow-y:auto;
  min-height:0;
}

.logbook-table-body{
  display:grid;
}

.logbook-table-row{
  padding:14px 18px;
  border-bottom:1px solid rgba(148,163,184,.08);
}

.logbook-table-row:last-child{
  border-bottom:none;
}

.cell{
  font-size:13px;
  min-width:0;
}

.cell.strong{
  font-size:20px;
  font-weight:900;
  line-height:1;
}

.cell-action{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

.icon-button{
  background:#243246;
  color:white;
  padding:9px 11px;
  font-size:11px;
  border:1px solid rgba(148,163,184,.12);
}

.flight-type-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.02em;
  border:1px solid transparent;
}

.flight-type-badge.solo{
  background:rgba(56,189,248,.12);
  color:#bfe9ff;
  border-color:rgba(56,189,248,.2);
}

.flight-type-badge.dual{
  background:rgba(139,92,246,.14);
  color:#ddd6fe;
  border-color:rgba(139,92,246,.22);
}

.empty-state{
  min-height:360px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
  border:1px dashed rgba(148,163,184,.25);
  border-radius:18px;
  background:rgba(11,18,32,.35);
  padding:22px;
}

.empty-title{
  font-size:20px;
  font-weight:900;
  color:var(--text);
  margin-bottom:6px;
}

.empty-text{
  max-width:300px;
  line-height:1.55;
  font-size:13px;
}

.description-card{
  grid-area:description;
  justify-self:center;
  margin-top:20px;
  padding:22px 26px;
  min-height:auto;
  background:rgba(15,23,42,.94);
  border:1px solid rgba(148,163,184,.18);
  border-radius:20px;
  box-shadow:0 22px 54px rgba(0,0,0,.24);
}

.description-card p{
  margin:0 0 10px;
  color:var(--muted);
  line-height:1.65;
  font-size:13px;
  text-align:left;
}

.description-card p:last-child{
  margin-bottom:0;
}

.logbook-table-body-wrap::-webkit-scrollbar{
  width:10px;
}

.logbook-table-body-wrap::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,.25);
  border-radius:999px;
}

.logbook-table-body-wrap::-webkit-scrollbar-track{
  background:transparent;
}

@media (max-width: 1120px){
  .app-shell{
    grid-template-columns:1fr;
  }

  .sidebar-card{
    position:static;
    min-height:auto;
    height:auto;
  }

  .workspace-card{
    min-height:auto;
    height:auto;
  }

  .sheet-summary-grid{
    grid-template-columns:1fr 1fr;
  }

  .logbook-sheet{
    height:520px;
  }
}

@media (max-width: 760px){
  .app-shell{
    padding:16px;
  }

  .auth-shell{
    padding:16px;
  }

  .auth-actions{
    grid-template-columns:1fr;
  }

  .stats-grid{
    grid-template-columns:1fr;
  }

  .mini-stat.full-span{
    grid-column:auto;
  }

  .page-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .logbook-table-head{
    display:none;
  }

  .logbook-table-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .cell-action{
    justify-content:flex-start;
  }

  .sheet-summary-grid{
    grid-template-columns:1fr;
  }

  .logbook-sheet{
    height:auto;
    grid-template-rows:auto auto auto;
  }

  .logbook-table-body-wrap{
    overflow:visible;
  }
}

#workspaceContainer{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}


#workspaceContainer{
  flex:1;
  display:flex;
  flex-direction:column;
}

.description-card h2{
  text-align:center;
}

@media (max-width: 1120px){
  .app-shell{
    grid-template-columns:1fr;
    grid-template-areas:
      "sidebar"
      "main"
      "description";
  }

  .sidebar-card{
    position:static;
    min-height:auto;
    height:auto;
  }

  .workspace-card{
    min-height:auto;
    height:auto;
  }

  .description-card{
    width:100%;
    justify-self:stretch;
  }

  .sheet-summary-grid{
    grid-template-columns:1fr 1fr;
  }

  .logbook-sheet{
    height:560px;
  }
}

@media (max-width: 760px){
  .app-shell{
    padding:16px;
    gap:16px;
  }

  .auth-actions{
    grid-template-columns:1fr;
  }

  .stats-grid{
    grid-template-columns:1fr;
  }

  .mini-stat.full-span{
    grid-column:auto;
  }

  .page-toolbar{
    flex-direction:column;
    align-items:stretch;
  }

  .sheet-summary-grid{
    grid-template-columns:1fr;
  }

  .logbook-table-head{
    display:none;
  }

  .logbook-table-row{
    grid-template-columns:1fr;
    gap:8px;
  }

  .cell-action{
    justify-content:flex-start;
  }

  .logbook-sheet{
    height:auto;
    grid-template-rows:auto auto auto;
  }

  .logbook-table-body-wrap{
    overflow:visible;
  }
}
