:root { --bg:#0b1220; --card:#101a2e; --muted:#98a2b3; --txt:#e6eaf2; --btn:#2563eb; --danger:#ef4444; --hit:#22c55e; }
*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;background:linear-gradient(180deg,#070b14,#0b1220);color:var(--txt)}
a{color:inherit}
.container{max-width:980px;margin:0 auto;padding:18px}
.topbar{position:sticky;top:0;z-index:10;display:flex;gap:12px;justify-content:space-between;align-items:center;padding:12px 18px;background:rgba(7,11,20,.8);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.06)}
.brand-link{text-decoration:none;font-weight:700}
.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.chip{padding:6px 10px;border:1px solid rgba(255,255,255,.12);border-radius:999px;font-size:13px;color:var(--muted)}
.btn{display:inline-block;border:none;text-decoration:none;background:var(--btn);color:white;padding:10px 12px;border-radius:10px;font-weight:600;cursor:pointer}
.btn:hover{filter:brightness(1.05)}
.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,.16);color:var(--txt)}
.btn.danger{background:var(--danger)}
.w100{width:100%}
.footer{opacity:.8;border-top:1px solid rgba(255,255,255,.06);margin-top:30px}
.hero{padding:16px 0}
.hero-card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:18px}
.card{background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:16px}
.card.mini{padding:12px;min-width:140px;text-align:center}
.form-card{max-width:480px;margin:18px auto}
h1{font-size:28px;margin:0 0 10px}
h2{margin:8px 0}
h3{margin:0 0 10px}
.muted{color:var(--muted)}
.small{font-size:12px}
.big{font-size:26px;font-weight:800}
.row{display:flex;align-items:center}
.space-between{justify-content:space-between}
.gap{gap:10px}
.mt{margin-top:14px}
.mt-sm{margin-top:10px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
@media(max-width:900px){.grid2,.grid3{grid-template-columns:1fr}}
label{display:block;margin:10px 0 6px;color:var(--muted);font-size:13px}
input,select{width:100%;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.22);color:var(--txt)}
.alert{background:rgba(239,68,68,.15);border:1px solid rgba(239,68,68,.35);padding:10px;border-radius:12px;margin:10px 0}
.success{background:rgba(34,197,94,.15);border:1px solid rgba(34,197,94,.35);padding:10px;border-radius:12px;margin:10px 0}
.list{display:flex;flex-direction:column;gap:10px}
.list-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px;border-radius:14px;border:1px solid rgba(255,255,255,.08);background:rgba(0,0,0,.18)}
.inline{display:inline}
.strike{text-decoration:line-through;opacity:.7}
.badge{display:inline-block;margin-left:8px;padding:3px 8px;border-radius:999px;font-size:12px;border:1px solid rgba(255,255,255,.16);color:var(--muted)}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-bottom:1px solid rgba(255,255,255,.08);text-align:left}
.week-bars{display:flex;gap:12px;align-items:flex-end;height:180px}
.bar-col{width:44px;text-align:center}
.bar{width:100%;background:rgba(255,255,255,.18);border-radius:12px}
.bar.hit{background:rgba(34,197,94,.45)}
.checkbox{display:flex;gap:8px;align-items:center}
.checkbox input{width:auto}

/* ===== Calendar Heatmap ===== */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.cal-head {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 6px 0;
}
.cal-cell {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  border-radius: 12px;
  padding: 10px 8px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cal-cell .dnum { font-weight: 800; font-size: 14px; }
.cal-cell .meta { font-size: 11px; color: var(--muted); }
.cal-empty {
  opacity: .35;
  border-style: dashed;
}
.heat-0 { background: rgba(255,255,255,.04); }
.heat-1 { background: rgba(34,197,94,.12); }
.heat-2 { background: rgba(34,197,94,.22); }
.heat-3 { background: rgba(34,197,94,.34); }
.heat-4 { background: rgba(34,197,94,.48); }
.heat-hit { outline: 2px solid rgba(34,197,94,.45); }

/* ===== Progress + Badges ===== */
.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.progress > div {
  height: 100%;
  background: rgba(34,197,94,.55);
  width: 0%;
}
.badge2{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(255,255,255,.14);
}
.badge2.hit{ background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.35); }
.badge2.miss{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.30); }

.note-input{
  width: 100%;
  margin-top: 8px;
  font-size: 13px;
}
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

@media(max-width:520px){
  .cal-cell{min-height:48px;padding:8px}
}


/* Tags (keywords) */
.tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.tag { display:inline-block; padding:6px 10px; border-radius:999px; border:1px solid rgba(0,0,0,.12); font-size:12px; background:rgba(0,0,0,.03); }

textarea{width:100%;padding:10px;border-radius:12px;border:1px solid rgba(0,0,0,.12);font-family:inherit;}


/* ✅ Dark UI dropdown fix */
select,
select.form-control,
.form-control select {
  background: #0f172a;          /* dark */
  color: #e5e7eb;               /* light text */
  border: 1px solid rgba(255,255,255,0.18);
}

/* options list (dropdown opened) */
select option {
  background: #0b1220;          /* slightly darker than select */
  color: #e5e7eb;
}

/* selected option highlight (works in many browsers) */
select option:checked,
select option:hover {
  background: #1f2937;
  color: #ffffff;
}

/* focus */
select:focus {
  outline: none;
  border-color: rgba(59,130,246,0.7);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}
/* --- Responsive topbar --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* mobile: hide desktop nav buttons, use dropdown as menu */
@media (max-width: 768px) {
  .topbar {
    flex-wrap: nowrap;
  }

  .top-actions {
    flex-wrap: nowrap;
    gap: 6px;
  }

  .nav-link {
    display: none !important;
  }

  .profile-chip {
    padding: 8px 10px;
  }

  .profile-chip-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
  }

  .profile-menu {
    right: 0;
    left: auto;
    min-width: 260px;
    max-width: calc(100vw - 24px);
  }

  /* show mobile links group */
  .pm-mobile {
    display: block;
  }
}

/* desktop: hide the mobile-only nav list inside dropdown */
@media (min-width: 769px) {
  .pm-mobile {
    display: none;
  }
}
/* --- Profile dropdown (details/summary) --- */
.profile-dd {
  position: relative;
  display: inline-block;
}

.profile-dd summary {
  list-style: none;
  cursor: pointer;
}

.profile-dd summary::-webkit-details-marker {
  display: none;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: inherit;
  user-select: none;
}

.profile-chip .caret {
  opacity: 0.8;
  font-size: 12px;
}

.profile-dd[open] .profile-chip {
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  padding: 10px;
  z-index: 50;
}

.profile-head {
  padding: 8px 10px 10px;
}

.profile-name {
  font-weight: 700;
}

.profile-email {
  opacity: 0.8;
  font-size: 12px;
  margin-top: 2px;
  word-break: break-all;
}

.pm-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.pm-item:hover {
  background: rgba(255,255,255,0.08);
}

.pm-sep {
  height: 1px;
  background: rgba(255,255,255,0.12);
  margin: 8px 6px;
}

.pm-logout {
  border: 1px solid rgba(255,255,255,0.12);
}
