@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #4facfe, #43e97b);
  min-height: 100vh;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  padding: 22px;
  max-width: 1100px;
  margin: 0 auto;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-card, .break-card {
  background: white;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 18px;
  background: #f1f5ff;
  display: grid;
  place-items: center;
  font-size: 38px;
  margin-bottom: 10px;
  overflow: hidden;
}

.upload-btn {
  display: inline-block;
  background: #111;
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  margin-bottom: 10px;
}

.name-input {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
}

.mini-text {
  margin: 10px 0 0;
  color: #666;
  font-size: 12px;
}

.small-btn {
  background: #4facfe;
  color: white;
  border: 0;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.main {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

h1 { margin: 0; font-size: 28px; }
.subtitle { margin: 4px 0 0; color: #666; }

.progress-wrap {
  position: relative;
  width: 110px;
  height: 110px;
}

.progress-ring { transform: rotate(-90deg); }
.ring-bg {
  fill: none;
  stroke: #e9eef7;
  stroke-width: 12;
}
.ring {
  fill: none;
  stroke: #43e97b;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 16px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.add-main-btn {
  background: #4facfe;
  color: white;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.stats { color: #444; font-size: 13px; }

.clear-btn {
  background: #111;
  color: white;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.table {
  margin-top: 14px;
  border: 1px solid #eee;
  border-radius: 14px;
}

.row {
  display: grid;
  grid-template-columns: 50px 1fr 160px 120px 210px;
  gap: 10px;
  padding: 12px 14px;
  align-items: center;
  border-bottom: 1px solid #f1f1f1;
}

.row.head {
  background: #f6f8ff;
  font-weight: 600;
  color: #333;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge.todo { background: #fff4d6; color: #8a5b00; }
.badge.done { background: #dcffe7; color: #0f5a2a; }
.badge.over { background: #ffe0e0; color: #8a0000; }

.action-btn {
  border: 0;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
}

.complete-btn { background: #43e97b; color: #0b3d1f; }
.delete-btn { background: #ff4d4d; color: white; }

.task-name {
  position: relative;
  cursor: help;
}

.tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 28px;
  background: #111;
  color: white;
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  width: 260px;
  z-index: 5;
}

.task-name:hover .tooltip { display: block; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  place-items: center;
  padding: 16px;
}

.modal-backdrop.show { display: grid; }

.modal {
  width: min(520px, 100%);
  background: white;
  border-radius: 18px;
  padding: 16px;
}

.modal label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #444;
}

.modal input, .modal textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ddd;
  outline: none;
  margin-top: 6px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.secondary-btn {
  background: #eee;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.add-btn {
  background: #4facfe;
  color: white;
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .row { grid-template-columns: 40px 1fr 140px 100px 180px; }
}

.onboarding {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4facfe, #43e97b);
  padding: 20px;
  z-index: 50;
}

.onboard-card {
  width: min(420px, 100%);
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  text-align: center;
}

.onboard-avatar {
  width: 110px;
  height: 110px;
  margin: 14px auto 10px;
  border-radius: 20px;
  background: #f1f5ff;
  display: grid;
  place-items: center;
  font-size: 44px;
  overflow: hidden;
}
/* Make avatar images look professional */
.avatar img, .onboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar, .onboard-avatar {
  border-radius: 22px;
}

.hello {
  margin: 10px 0 0;
  font-weight: 600;
  color: #111;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: #444;
}

.empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #f3f6ff;
  display: grid;
  place-items: center;
  font-size: 24px;
}

.empty-title {
  font-weight: 700;
  font-size: 18px;
}

.empty-sub {
  margin-top: 6px;
  font-size: 13px;
  color: #666;
}

/* Premium feel tweaks */
.main, .profile-card, .break-card {
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 20px 50px rgba(0,0,0,0.10);
}

.profile-card, .break-card {
  backdrop-filter: blur(10px);
}

.add-main-btn {
  background: linear-gradient(135deg, #4facfe, #2f80ed);
}

.add-main-btn:hover {
  transform: translateY(-1px);
}

.clear-btn:hover, .small-btn:hover, .upload-btn:hover {
  transform: translateY(-1px);
}

.row {
  transition: 0.2s ease;
}

.row:hover {
  background: #fbfcff;
}

.task-name{
  position: relative;
}

.task-name:hover .tooltip{
  opacity: 1;
  transform: translateY(0);
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap; /* stops the button from going down */
}

.action-btn {
  white-space: nowrap;
}
.row {
  display: grid;
  grid-template-columns: 40px 1fr 120px 120px 180px;
  align-items: center;
}

.actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
  flex-wrap:nowrap;
}

.actions .action-btn{
  width: auto !important;
  flex: 0 0 auto;
  display: inline-flex;
  white-space: nowrap;
}