:root {
  --primary-orange: #ea580c;
  --light-orange: #f97316;
  --bg-peach: #fff7ed;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--bg-peach);
  color: var(--text-dark);
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  background: linear-gradient(
    180deg,
    var(--light-orange),
    var(--primary-orange)
  );
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  background: var(--white);
  padding: 1rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}

.logo img {
  width: 80px;
}

.menu {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.nav-links a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0.5rem;
  transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  transform: translateX(5px);
}

.sign-in-btn {
  background: var(--white);
  color: var(--primary-orange);
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 0.8rem;
  border-radius: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* --- SUPPORT DROPDOWN --- */
.support-dropdown {
  position: relative;
}

.support-trigger {
  width: 100%;
  background: #111827;
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-content {
  position: absolute;
  bottom: 120%;
  left: 0;
  width: 100%;
  background: #111827;
  border-radius: 0.8rem;
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.support-dropdown:hover .support-content {
  display: flex;
}

.support-content a {
  color: white;
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.4rem;
}

.support-content a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- MAIN CONTENT --- */
.main-content {
  flex: 1;
  padding: 2.5rem;
  overflow-y: auto;
}

.welcome-banner {
  background: linear-gradient(135deg, #ffedd5, #fdba74);
  padding: 2.5rem;
  border-radius: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.welcome-text h1 {
  color: #9a3412;
}
.btn-primary {
  background: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 0.8rem;
  color: var(--primary-orange);
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.btn-primary:hover {
  background: var(--primary-orange);
  color: var(--white);
}

/* --- RIGHT PANEL --- */
.right-panel {
  width: 320px;
  background: var(--white);
  padding: 2.5rem 1.5rem;
  border-left: 1px solid #f1f5f9;
}

.user-profile {
  text-align: center;
  background: var(--bg-peach);
  padding: 1.5rem;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
}

.user-profile img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--white);
}

.badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.section-title {
  margin-bottom: 1rem;
  font-weight: 600;
}

.schedule-item {
  background: var(--bg-peach);
  padding: 1rem;
  border-radius: 1rem;
  margin-bottom: 0.8rem;
  border-left: 4px solid var(--primary-orange);
}

/* --- TODO LIST --- */
.todo-section {
  padding: 10px;
  background: transparent; /* Light background pe clean lagega */
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

/* 2. Modern Input Field */
.todo-input-group {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

#task-input {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

#task-input:focus {
  border-color: #ff8c42; /* Dashboard Orange Theme */
  box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}

#add-btn {
  background: #ff8c42;
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#add-btn:hover {
  background: #e67a32;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.3);
}

/* 3. Task List Styling */
#task-list {
  list-style: none;
  padding: 0;
}

#task-list li {
  background: white;
  margin-bottom: 10px;
  padding: 12px 15px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

#task-list li:hover {
  border-color: #ff8c42;
  transform: scale(1.02);
}

/* 4. Action Buttons Inside Task */
.actions {
  display: flex;
  gap: 10px;
}

.actions button {
  background: #f8fafc;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.done-btn i {
  color: #cbd5e1;
  font-size: 18px;
}
.remove-btn i {
  color: #fca5a5;
  font-size: 16px;
}

/* 5. Logic States (JS Connect) */
#task-list li.done {
  background: #f1f5f9;
  opacity: 0.7;
}

#task-list li.done span {
  text-decoration: line-through;
  color: #94a3b8;
}

#task-list li.done .done-btn i {
  color: #10b981 !important; /* Green when finished */
}

.remove-btn:hover {
  background: #fee2e2;
}
.remove-btn:hover i {
  color: #ef4444;
}

/* ===== focus timer===== */
.focus-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px;
  margin: 20px auto;
  width: 95%; /* Planner ki width se align */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.focus-section h2 {
  margin: 0;
  color: #ff7626; /* Tera orange color */
  font-size: 1.4rem;
}
/* ==== FOCUS MODES FILTER BUTTONS ==== */

.focus-modes {
  display: flex;
  gap: 10px;
  margin: 15px 0 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: none;
  background: #fcefe8;
  color: #ff7626;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.mode-btn:hover {
  transform: translateY(-2px);
}

.mode-btn.active {
  background: #ff7626;
  color: white;
}

/* BREAK GREEN ACTIVE */
.mode-btn.break-active {
  background: #22c55e;
  color: white;
}

/* ===== TIMER TABS ===== */

.timer-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  padding: 8px 18px;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  background: #f1f5f9;
  font-weight: 600;
  transition: 0.3s;
}

.tab.active {
  background: #ff7626;
  color: white;
}

.custom-time {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

#minuteInput {
  width: 80px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

#applyTime {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: #ff7626;
  color: white;
  cursor: pointer;
}
/* ===== TIMER INPUT STYLING FIX ===== */

#focusInput,
#shortInput,
#longInput {
  display: none; /* Hide raw inputs */
}

.custom-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

#minuteInput {
  width: 80px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 16px;
}

#applyTime {
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: #ff7626;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

#applyTime:hover {
  background: #e9641f;
}

/* Active Tab Style */
.timer-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 15px;
}

.tab {
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  background: #e9e9e9;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.tab.active {
  background: #ff7626;
  color: white;
}

/* Break mode green */
.break-mode .circle {
  background: conic-gradient(#22c55e 0deg, #e6f9ef 0deg);
}

.break-mode .session {
  background: #e6f9ef;
  color: #22c55e;
}

.subtitle {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Circle size ko balance kiya hai taaki planner ke upar bojh na lage */
.circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: conic-gradient(#ff7626 0deg, #fcefe8 0deg);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

.inner {
  width: 150px;
  height: 150px;
  background: white;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.time {
  font-size: 32px;
  font-weight: 800;
  color: #333;
}

.session {
  margin-top: 5px;
  padding: 4px 12px;
  background: #fcefe8;
  color: #ff7626;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.controls {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.controls button {
  border: none;
  border-radius: 12px; /* Dashboard style buttons */
  padding: 10px 20px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

.reset {
  background: #f5f5f5;
  color: #666;
}

.play {
  background: #ff7626;
  color: white;
  font-weight: bold;
  min-width: 80px;
}

.play:hover {
  transform: scale(1.05);
  background: #e66a26;
}
/* --- CHATBOX --- */
/* ===== UPGRADED AI CHAT UI ===== */
#open-chat {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  /* Dashboard matching Orange Gradient */
  background: linear-gradient(135deg, #ff7a00 0%, #ff9f43 100%);
  color: white;
  font-size: 28px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#open-chat:hover {
  transform: scale(1.1) rotate(5deg);
}

#chat-box {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 360px;
  height: 500px;
  background: #ffffff;
  border-radius: 20px;
  display: none;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  z-index: 999;
  overflow: hidden;
  border: 1px solid rgba(255, 122, 0, 0.1);
}

#messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #fffaf5; /* Subtle peach tint for reading comfort */
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  padding: 12px 16px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 80%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.user-msg {
  background: #ff7a00;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px; /* Sharp corner style */
  box-shadow: 0 4px 10px rgba(255, 122, 0, 0.2);
}

.ai-msg {
  background: white;
  color: #444;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

#input-area {
  display: flex;
  padding: 15px;
  background: white;
  border-top: 1px solid #f0f0f0;
  align-items: center;
}

#user-input {
  flex: 1;
  padding: 12px 18px;
  border-radius: 25px;
  border: 1px solid #eee;
  background: #f9f9f9;
  color: #333;
  outline: none;
  transition: border 0.3s;
}

#user-input:focus {
  border-color: #ff7a00;
  background: #fff;
}

.send {
  margin-left: 10px;
  padding: 10px 18px;
  background: #ff7a00;
  color: white;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.send:hover {
  background: #e66e00;
}

/* Scrollbar styling for a premium feel */
#messages::-webkit-scrollbar {
  width: 5px;
}
#messages::-webkit-scrollbar-thumb {
  background: #ffdbb5;
  border-radius: 10px;
}

/* ==============================
   FULL RESPONSIVE FIX
============================== */

/* --- BODY FLEX LAYOUT --- */
body {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
}

/* --- MAIN CONTENT --- */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* --- RIGHT PANEL --- */
.right-panel {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid #f1f5f9;
  padding: 2rem 1.5rem;
}

/* ==============================
   TABLET LAYOUT (≤1024px)
============================== */
@media (max-width: 1024px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1rem;
  }

  .main-content {
    width: 100%;
    padding: 1.5rem;
  }

  .right-panel {
    width: 100%;
    border-left: none;
    padding: 1.5rem;
  }

  .welcome-banner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .focus-section {
    width: 100%;
    margin: 1rem 0;
  }
}

/* ==============================
   MOBILE LAYOUT (≤768px)
============================== */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  /* Sidebar stack */
  .sidebar {
    width: 100%;
    height: auto;
    padding: 1rem;
  }

  .nav-links {
    flex-direction: column;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 0.6rem;
  }

  .welcome-banner {
    flex-direction: column;
    padding: 1rem;
    text-align: center;
  }

  .btn-primary {
    width: 100%;
  }

  /* Focus timer scale down */
  .focus-section {
    width: 100%;
    padding: 15px;
  }

  .circle {
    width: 140px;
    height: 140px;
  }

  .inner {
    width: 115px;
    height: 115px;
  }

  .time {
    font-size: 22px;
  }

  .controls {
    flex-direction: column;
    gap: 10px;
  }

  .controls button {
    width: 100%;
  }

  .right-panel {
    width: 100%;
    padding: 1rem;
  }

  /* Chatbox responsive */
  #chat-box {
    width: 95%;
    right: 2.5%;
    height: 75vh;
  }

  #open-chat {
    width: 55px;
    height: 55px;
    font-size: 22px;
  }
}

/* ==============================
   SMALL PHONES (≤480px)
============================== */
@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
  }

  .welcome-text h1 {
    font-size: 1.2rem;
  }

  .focus-section {
    padding: 12px;
  }

  .circle {
    width: 120px;
    height: 120px;
  }

  .inner {
    width: 95px;
    height: 95px;
  }

  .time {
    font-size: 18px;
  }

  #chat-box {
    height: 80vh;
  }
}
