/* Bar atas, tata letak, navigasi & deretan tanggal */

/* ---------- Bar atas ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--wika);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand img {
  height: 30px;
  width: auto;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.brand-text b {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-text small {
  font-size: 12px;
  color: var(--sub);
}
.user {
  font-size: 14px;
  color: var(--sub);
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--sub);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.theme-toggle span:first-child {
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
}
.theme-toggle:hover {
  background: var(--wash);
}
.user strong {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
  display: inline-block;
  vertical-align: bottom;
}
.user-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
}
.user-identity small {
  margin-top: 3px;
  color: var(--sub);
  font-size: 11px;
  white-space: nowrap;
}
.link {
  background: var(--wika-soft);
  border: 1px solid rgba(1, 159, 227, 0.18);
  border-radius: 999px;
  padding: 7px 14px;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
@media (hover: hover) {
  .link:hover {
    background: rgba(1, 159, 227, 0.08);
    border-color: rgba(1, 159, 227, 0.28);
  }
}

/* ---------- Tata letak (desktop) ---------- */
.app {
  display: grid;
  gap: 0 32px;
  padding: 20px 24px 40px;
  max-width: 1240px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) 300px;
  /* Reservasi saya selalu di bawah kalender; panel samping di kanan memanjang */
  grid-template-areas: "board side" "mine side";
  grid-template-rows: auto 1fr;
  align-items: start;
}
.board-area {
  grid-area: board;
  min-width: 0;
}
.side {
  grid-area: side;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mine-list {
  grid-area: mine;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ---------- Navigasi tanggal ---------- */
.daybar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.daybar h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 8px 0 0;
  font-variant-numeric: tabular-nums;
}
.navbtns {
  display: flex;
  gap: 8px;
}
.step,
.today {
  height: 36px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  cursor: pointer;
}
.step {
  width: 36px;
  font-size: 18px;
  line-height: 1;
}
.today {
  padding: 0 12px;
  font-size: 14px;
}
.new-btn {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--button-bg);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  margin-left: auto;
}
.jump {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 14px;
  cursor: pointer;
}
@media (hover: hover) {
  .step:hover,
  .today:hover,
  .jump:hover {
    background: var(--wash);
  }
}

/* Deretan tanggal */
.strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.strip .step {
  flex: none;
  height: 52px;
}
.days {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(14, minmax(44px, 1fr));
  gap: 4px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.days::-webkit-scrollbar {
  display: none;
}
.d {
  position: relative;
  height: 52px;
  padding: 4px 0 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.d .dw {
  font-size: 11px;
  color: var(--sub);
}
.d .dn {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.d.wk .dw,
.d.wk .dn {
  color: var(--other-edge);
}
.d.gone {
  opacity: 0.55;
}
.d.today {
  border-color: var(--wika);
}
.d.today .dn {
  color: var(--accent);
}
.d.has::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--other-edge);
}
.d.on {
  background: var(--button-bg);
  border-color: var(--accent);
  opacity: 1;
}
.d.on .dw,
.d.on .dn {
  color: #fff;
}
.d.on.has::after {
  background: #fff;
}
@media (hover: hover) {
  .d:not(.on):hover {
    background: var(--wash);
  }
}
