:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: #e9efff;
  background: #0b1220;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #76aafa;
  outline-offset: 2px;
}
.app {
  max-width: 1440px;
  margin: auto;
  padding: 24px;
}
.top,
.toolbar,
.row,
.metrics,
.legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.top {
  justify-content: space-between;
  margin-bottom: 24px;
}
.brand {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.7px;
}
.brand span {
  color: #62a2ff;
}
.muted {
  color: #9cacc8;
  font-size: 13px;
}
.card {
  background: #121f33;
  border: 1px solid #2a3c57;
  border-radius: 14px;
  padding: 18px;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
}
.sidebar h2 {
  font-size: 14px;
  color: #abbad1;
  margin: 0 0 14px;
}
.toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}
button {
  border: 1px solid #354866;
  background: #1c2d47;
  color: #e9efff;
  border-radius: 9px;
  padding: 9px 12px;
}
button:hover {
  background: #294469;
}
.primary {
  background: #3476df;
  border-color: #3476df;
  color: white;
}
.primary:hover {
  background: #2564c4;
}
.danger {
  border-color: #9b4251;
  color: #ffabb4;
}
.iconbtn {
  padding: 8px 12px;
}
.metrics {
  margin-bottom: 18px;
}
.metric {
  flex: 1;
  min-width: 130px;
}
.metric strong {
  font-size: 24px;
  display: block;
  margin-top: 5px;
}
.projects {
  display: grid;
  gap: 8px;
}
.project {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  padding: 9px;
  border-radius: 8px;
  background: #1a2a42;
  overflow-wrap: anywhere;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.project span:nth-child(2) {
  flex: 1;
}
.project small {
  color: #abc0de;
}
.calendarScroll {
  overflow-x: auto;
}
.calendar {
  display: grid;
  grid-template-columns: 60px repeat(var(--days, 5), minmax(125px, 1fr));
  min-width: calc(60px + var(--days, 5) * 125px);
  position: relative;
}
.dayhead {
  padding: 12px 4px;
  text-align: center;
  border-bottom: 1px solid #344761;
  font-size: 13px;
  font-weight: 700;
}
.dayhead.today {
  color: #7eb5ff;
}
.hours {
  position: relative;
  height: 576px;
}
.hour {
  height: 48px;
  border-bottom: 1px solid #2c3b52;
  text-align: right;
  padding-right: 8px;
  font-size: 11px;
  color: #94a8c6;
  transform: translateY(-7px);
}
.day {
  height: 576px;
  position: relative;
  border-left: 1px solid #344761;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 47px,
    #2c3b52 47px,
    #2c3b52 48px
  );
  cursor: crosshair;
}
.day:hover {
  background-color: #172841;
}
.entry {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 6px;
  border-left: 4px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, #15253b);
  padding: 5px 6px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: #f4f8ff;
  font-size: 12px;
  line-height: 1.35;
  z-index: 2;
}
.entry:hover {
  filter: brightness(1.3);
}
.entry:focus-visible {
  z-index: 12;
}
.entry.colliding {
  outline: 2px dashed #ffbf6c;
  outline-offset: -3px;
}
.entry .resize {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  cursor: ns-resize;
  background: linear-gradient(transparent, #ffffff2b);
}
.entry .resize:after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: #eaf3ff8c;
  border-radius: 4px;
  margin: 5px auto 0;
}
.day .selection {
  position: absolute;
  left: 2px;
  right: 2px;
  z-index: 5;
  border: 2px dashed #9dc4ff;
  background: #4b85e650;
  pointer-events: none;
  border-radius: 5px;
}
.day .overflow-note {
  position: absolute;
  right: 3px;
  z-index: 4;
  font-size: 10px;
  background: #324765;
  color: #fff;
  border-radius: 4px;
  padding: 2px;
}
.day .overflow-note.top {
  top: 0;
}
.day .overflow-note.bottom {
  bottom: 0;
}
.day:focus-visible {
  outline: 2px solid #76aafa;
  outline-offset: -2px;
}
.entry.dragging {
  opacity: 0.5;
}
.calendarScroll {
  touch-action: pan-x pan-y;
}
.entry b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry small {
  font-size: 10px;
  color: #dae6ff;
}
.empty {
  color: #8ea4c1;
  font-size: 13px;
}
.footer {
  margin-top: 14px;
  color: #91a5bf;
  font-size: 12px;
}
dialog {
  border: 1px solid #435b7b;
  border-radius: 15px;
  background: #132238;
  color: #f2f6ff;
  padding: 24px;
  width: min(460px, calc(100vw - 28px));
  box-shadow: 0 25px 90px #000b;
}
dialog::backdrop {
  background: #020713be;
}
form {
  display: grid;
  gap: 12px;
}
form h2 {
  margin: 0 0 6px;
  font-size: 20px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: #c4d4ed;
}
input,
select,
textarea {
  background: #0b1728;
  color: white;
  border: 1px solid #3b4e69;
  border-radius: 8px;
  padding: 10px;
  width: 100%;
}
textarea {
  min-height: 72px;
  resize: vertical;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.actions .danger {
  margin-right: auto;
}
.sidebar .primary {
  width: 100%;
  margin-top: 14px;
}
.hint {
  font-size: 12px;
  color: #a6bad7;
  line-height: 1.5;
}
.backup-reminder {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #856a3b;
  border-radius: 10px;
  background: #2a2418;
  color: #ffe2a8;
  font-size: 12px;
  line-height: 1.45;
}
.backup-reminder .row {
  gap: 8px;
}
.backup-reminder button {
  padding: 7px 9px;
  font-size: 12px;
}
.backup-reminder[hidden] {
  display: none;
}
.reportTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.reportTable th,
.reportTable td {
  padding: 9px;
  border-bottom: 1px solid #344761;
  text-align: left;
}
.reportTable td.num,
.reportTable th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.reportTable .warning {
  color: #ffc07c;
}
.reportTable .good {
  color: #92dec0;
}
.reportGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.reportGrid strong {
  display: block;
  font-size: 21px;
  margin-top: 4px;
}
.reportWrap {
  overflow: auto;
}
.badge {
  font-size: 11px;
  color: #9cc3ff;
  background: #203b61;
  border-radius: 99px;
  padding: 5px 10px;
}
@media (max-width: 860px) {
  .app {
    padding: 12px;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .top {
    align-items: flex-start;
  }
  .sidebar {
    order: 2;
  }
  .calendarPanel {
    order: 1;
  }
  .metric strong {
    font-size: 20px;
  }
}
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  z-index: 100;
  padding: 10px 14px;
  background: #fff;
  color: #101b30;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}
.section-heading {
  margin: 0 0 4px;
  font-size: 20px;
}
.report-section {
  margin-top: 18px;
}
.noscript {
  margin: 1rem;
  padding: 1rem;
  background: #fff3cd;
  color: #402f00;
  border-radius: 8px;
}
.projects button {
  width: 100%;
  text-align: left;
}
.projects > button:not(.project) {
  background: transparent;
  border-color: transparent;
  color: #d9e7ff;
}
.day[role='button'] {
  min-width: 0;
}
.entry {
  min-height: 18px;
}
.footer {
  min-height: 1.5em;
}
.app {
  min-height: 100vh;
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .calendar {
    grid-template-columns: 52px repeat(var(--days, 5), minmax(112px, 1fr));
    min-width: calc(52px + var(--days, 5) * 112px);
  }
}
@media (max-width: 560px) {
  .app {
    padding: 8px;
  }
  .top {
    gap: 16px;
  }
  .top nav {
    width: 100%;
  }
  .top nav button {
    flex: 1;
    min-width: 44%;
  }
  .card {
    padding: 12px;
  }
  .two,
  .reportGrid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    align-items: flex-start;
  }
  .toolbar > .row {
    width: 100%;
  }
  .toolbar > .row button {
    min-height: 44px;
  }
  .actions button,
  button {
    min-height: 44px;
  }
  dialog {
    padding: 16px;
  }
  .reportTable {
    font-size: 12px;
  }
  .reportTable th,
  .reportTable td {
    padding: 7px 5px;
  }
}
