/* ===============================
   Base
================================= */
:root {
  --color-bg-start: #ff7a18;
  --color-bg-end: #af0069;
  --color-card-bg: #ffffff;
  --color-text: #222;
  --color-text-light: #666;
  --color-primary: #ff4d8d;
  --color-primary-dark: #e63b7a;
  --color-error: #d32f2f;

  --radius-lg: 1rem;
  --radius-sm: 0.5rem;
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.08);
  --shadow-sm-paused: 0 2px 6px 1px rgba(238, 93, 93, 0.89);
  --shadow-sm-going: 0 2px 6px 1px rgba(139, 238, 93, 0.89);
  --font-body: "Inter", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 10px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: linear-gradient(
    135deg,
    var(--color-bg-start),
    var(--color-bg-end)
  );
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* ===============================
   Layout
================================= */
.dashboard {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
  margin: 1rem;
  gap: 1rem;
}

.sidebar {
  flex: 0 0 220px;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  text-align: center;
}

.content {
  flex: 1;
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

/* ===============================
   Sidebar
================================= */
.avatar {
  margin-bottom: 1rem;
}
.avatar__img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.greeting {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.username {
  margin: 0.3rem 0 1rem;
}

.stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stat {
  background: #f9f9f9;
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  box-shadow: var(--shadow-sm);
}
.stat__value {
  display: block;
  font-weight: 600;
  font-size: 1.2rem;
}
.stat__label {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ===============================
   Timers
================================= */
.section-title {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.todo-title {
  margin-top: 50px;
}

.timers-scroll {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  margin: 1rem 0 2rem;
  padding: 1em 0.5em;
  position: relative;
}

.timers-scroll::-webkit-scrollbar {
  width: 0px;
}

.timer-card {
  flex: 0 0 200px;
  background: #f9f9f9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  text-align: center;
  transition: 250ms ease-in-out;
  position: relative;
}
.remove-timer-btn {
  position: absolute;
  top: 5px;
  left: 5px;
  background-color: transparent;
  border: none;
  outline: none;
  color: #f3f3f3;
  transition: 250ms ease-in-out;
  cursor: pointer;
}
.remove-timer-btn:hover {
  color: #d32f2f;
}
.timer-card.paused {
  box-shadow: var(--shadow-sm-paused);
}
.timer-card.going {
  box-shadow: var(--shadow-sm-going);
}
.timer-card__title {
  margin: 0 0 0.5rem;
}
.break-time-text {
  font-size: 0.75rem;
  color: #6ef39a;
}
.timer-card__time-left {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}
.timer-card__time-total {
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.timer-card__control-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.timer-card__btn {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  border-radius: 3px;
  padding: 7px 0;
}
.restart-btn {
  background-color: var(--color-primary-dark);
  cursor: pointer;
}
.btn-paused {
  cursor: pointer;
  background-color: var(--color-bg-start);
}
.btn-going {
  cursor: pointer;
  background-color: #6ef39a;
}
.todo-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 1rem;
}

/* ===============================
Todos
================================= */
.todo-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  cursor: pointer;
}

.todo-item input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.todo-item input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary-dark);
}

/* Add Todo button */
.button--add--timer,
.button--add--todo {
  display: block;
  margin: 2rem auto 0;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s;
}
.button--add--timer:hover,
.button--add--todo:hover {
  background: var(--color-bg-start);
}

.button--clear--todo {
  display: block;
  margin: 2rem auto 0;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background-color: #d32f2f;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.25s;
}

.remove-todo-btn {
  background-color: transparent;
  border: none;
  outline: none;
  color: #f3f3f3;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  transition: 250ms ease-in-out;
  cursor: pointer;
}

.remove-todo-btn:hover {
  color: #d32f2f;
}
/* ===============================
Dark Mode
================================= */
body.dark {
  --color-card-bg: #1f1f1f;
  --color-text: #f3f3f3;
  --color-text-light: #aaa;
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark .sidebar,
body.dark .content {
  background: var(--color-card-bg);
}

body.dark .stat,
body.dark .timer-card {
  background: #2a2a2a;
}

body.dark .todo-item input[type="radio"] {
  border-color: var(--color-primary);
}
body.dark .todo-item input[type="radio"]:checked {
  background: var(--color-primary);
}
