.app {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 6px;
  font-weight: 400;
}

.clock-section {
  text-align: center;
  padding: 20px 0;
}

.live-clock {
  font-size: 3.6rem;
  font-weight: 700;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}

.live-date {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 400;
}

.actions {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  justify-content: center;
}

.today-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.schedule-info {
  display: flex;
  justify-content: center;
  gap: 20px;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
}


.schedule-info span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-info .icon {
  font-size: 1rem;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.log-header .card-title {
  margin-bottom: 0;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.week-nav button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.week-nav button:hover {
  background: var(--surface-hover);
}

.week-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  min-width: 180px;
  text-align: center;
}

.header-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
}

.action-menu {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: rgba(26, 26, 46, 0.95);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 180px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dropdown.active {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.dropdown-item.red:hover {
  background: rgba(248, 113, 113, 0.1);
  color: var(--red);
}

.dropdown-item .icon {
  font-size: 1.1rem;
  width: 20px;
  display: flex;
  justify-content: center;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
  opacity: 0.5;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  padding: 0;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

.btn-icon-small {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon-small:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 600px) {
  .header {
    padding-bottom: 8px;
  }

  .header h1 {
    font-size: 1.6rem;
  }

  .header-actions {
    position: static;
    justify-content: center;
    margin-top: 14px;
    gap: 10px;
  }

  .live-clock {
    font-size: 2.6rem;
  }

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

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .schedule-info {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }

  .log-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .log-actions {
    justify-content: space-between;
    width: 100%;
  }

  #weeklyLog {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th:nth-child(1),
  td:nth-child(1) {
    display: none;
  }



  td {
    padding: 10px 8px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  th {
    padding: 0 8px 8px;
    font-size: 0.62rem;
  }

  .total-row {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .week-label {
    min-width: 140px;
    font-size: 0.72rem;
  }
}