:root {
  --primary: #84ccb0;
  --primary-hover: #6bb5a0;
  --primary-pressed: #5aa890;
  --secondary: #e5f4eb;
  --text: #334155;
  --text-secondary: #64748b;
  --background: #f8fafc;
  --surface: #ffffff;
  --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.07);
  --success: #10b981;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background-color: var(--background);
  min-height: 100vh;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr auto;
  height: 100vh;
  width: 100vw;
}

/* Sidebar */
.sidebar {
  background: var(--surface);
  border-right: 1px solid #e2e8f0;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accent-dot {
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
}

.app-title {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-item:hover {
  background: var(--secondary);
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
}

.date-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.date-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.date-item-btn {
  padding: 10px 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.2s;
}

.date-item-btn:hover {
  color: var(--primary);
}

.date-item-badge {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 20px;
  font-weight: 500;
}

.section-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 20px 0 16px;
}

.pomodoro-settings {
  margin-top: auto;
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label span {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-input {
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s;
}

.form-input::-webkit-inner-spin-button {
  opacity: 1;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.save-btn {
  margin-top: 16px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.save-btn:hover {
  background: var(--primary-hover);
}

/* Main Content */
.main-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.current-date {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.summary-text {
  color: var(--text-secondary);
}

/* Task List */
.task-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s;
}

.task-card:hover {
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
}

.custom-checkbox {
  width: 28px;
  height: 28px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex: 0 0 28px;
}

.custom-checkbox svg {
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.custom-checkbox:hover {
  border-color: var(--primary);
}

.custom-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox.checked svg {
  stroke: #ffffff;
}

.task-info {
  flex: 1;
}

.task-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.task-time svg {
  width: 16px;
  height: 16px;
}

.task-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0;
  transition: all 0.2s;
}

.task-title.done {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-tags {
  display: flex;
  gap: 8px;
}

.category-tag {
  padding: 3px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.work {
  background: #dbeafe;
  color: #1e40af;
}

.calls {
  background: #fef3c7;
  color: #92400e;
}

.personal {
  background: #fce7f3;
  color: #88139a;
}

.break {
  background: #d1fae5;
  color: #065f46;
}

.task-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-actions button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.task-actions button svg {
  width: 16px;
  height: 16px;
}

.task-actions button:hover {
  background: #e2e8f0;
}

.task-actions .edit-btn:hover {
  background: #dbeafe;
  color: #2563eb;
}

.task-actions .delete-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

/* Add Task Form */
.add-task-form {
  padding: 24px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-top: auto;
}

.add-task-form form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.add-task-form input,
.add-task-form select {
  flex: 1;
  min-width: 160px;
}

.add-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  flex: 0 0 140px;
}

.add-btn:hover {
  background: var(--primary-hover);
}

/* Pomodoro Timer */
.pomodoro-timer {
  padding: 40px 30px;
  background: var(--surface);
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.timer-ring {
  position: relative;
  width: 200px;
  height: 200px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  stroke: var(--primary);
  transition: stroke-dashoffset 0.3s;
}

.timer-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.timer-time {
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
}

.timer-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 8px;
}

.timer-task {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.timer-controls {
  display: flex;
  gap: 16px;
}

.btn-pill {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pill:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.btn-pill svg {
  width: 24px;
  height: 24px;
}

.btn-pill.skip-pomodoro {
  background: var(--text-secondary);
}

.btn-pill.skip-pomodoro:hover {
  background: var(--text);
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.toast {
  padding: 16px 24px;
  background: #10b981;
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.toast.error {
  background: #ef4444;
}

@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .app {
    grid-template-columns: 280px 1fr;
    overflow: hidden;
  }
  
  .pomodoro-timer {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    border-left: none;
    border-top: 1px solid #e2e8f0;
    gap: 24px;
    flex-direction: row;
    align-items: center;
    padding: 30px;
  }
  
  .timer-ring {
    width: 140px;
    height: 140px;
  }
  
  .timer-content .timer-time {
    font-size: 28px;
  }
  
  .timer-task {
    display: none;
  }
}

@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: absolute;
    left: -100%;
    top: 0;
    height: 100%;
    width: 100%;
    transition: left 0.3s;
    z-index: 100;
  }
  
  .sidebar.active {
    left: 0;
  }
  
  .add-task-form {
    padding: 20px;
  }
  
  .add-task-form form {
    flex-direction: column;
  }
}
