/* =========================
   BASE
========================= */

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto;
  background: #f6f7fb;
  color: #111827;
}

/* =========================
   APP LAYOUT (SIDEBAR APP)
========================= */

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

/* =========================
   SIDEBAR
========================= */

.sidebar {
  background: linear-gradient(180deg, #0f172a, #111827);
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 30px;
}

.user-box {
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  margin-bottom: 20px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  font-weight: bold;
}

.user-email {
  font-size: 12px;
  margin-top: 10px;
  color: #cbd5e1;
  word-break: break-word;
}

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

.menu-item {
  text-decoration: none;
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 10px;
  transition: 0.2s;
}

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

.menu-logout button {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #ef4444;
  color: white;
  cursor: pointer;
}

/* =========================
   MAIN CONTENT
========================= */

.main {
  padding: 40px;
  overflow-y: auto;
}

.page-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 25px;
}

/* =========================
   TODO FORM
========================= */

.todo-form {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

.todo-input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
}

.todo-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.add-btn {
  background: #6366f1;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 600;
}

.add-btn:hover {
  background: #4f46e5;
}

/* =========================
   TODO CARD
========================= */

.todo-card {
  background: white;
  padding: 18px 20px;
  border-radius: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transition: 0.2s;
}

.todo-card:hover {
  transform: translateY(-2px);
}

.todo-title {
  font-size: 16px;
}

.completed {
  text-decoration: line-through;
  color: #9ca3af;
}

.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  margin-left: 8px;
}

.badge.done {
  background: #22c55e;
  color: white;
}

/* =========================
   ACTION BUTTONS
========================= */

.actions {
  display: flex;
  gap: 8px;
}

.btn {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.done { background: #22c55e; color: white; }
.done:hover { background: #16a34a; }

.edit { background: #3b82f6; color: white; }
.edit:hover { background: #2563eb; }

.delete { background: #ef4444; color: white; }
.delete:hover { background: #dc2626; }

/* =========================
   EMPTY STATE
========================= */

.empty {
  text-align: center;
  margin-top: 60px;
  color: #9ca3af;
}

/* =========================
   AUTH PAGE (LOGIN / SIGNUP)
========================= */

.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
}

/* LEFT PANEL */
.auth-left {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.auth-left h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.auth-left p {
  opacity: 0.9;
}

/* RIGHT PANEL */
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f7fb;
}

/* AUTH CARD */
.auth-card {
  width: 360px;
  background: white;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.auth-card h2 {
  margin-bottom: 5px;
}

.subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 20px;
}

/* AUTH FIELDS */
.field {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 13px;
  margin-bottom: 5px;
}

.field input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* AUTH BUTTON */
.actions input {
  width: 100%;
  padding: 12px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.actions input:hover {
  background: #4338ca;
}

/* AUTH LINKS */
.links {
  margin-top: 15px;
  text-align: center;
}

.links a {
  color: #4f46e5;
  text-decoration: none;
}
