/*<------------GOOGLE FONT------------>*/

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/*<------------LIGHT THEME------------>*/

:root,
[data-theme="light"] {
  --bg-color: #f7f8fc;
  --surface: #ffffff;
  --sidebar: #f0f0fa;
  --primary-text: #1f2937;
  --secondary-text: #808080;
  --border: #e5e7eb;
  --yellow: #ffd15b;
  --yellow-soft: #fff4cf;
  --green: #e5f7da;
  --pink: #ffe1ee;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/*<------------DARK THEME------------>*/

[data-theme="dark"] {
  --bg-color: #17191f;
  --surface: #24262d;
  --sidebar: #1e2027;
  --primary-text: #f5f5f5;
  --secondary-text: #a8adb8;
  --border: #3a3d45;
  --yellow: #f8b93a;
  --yellow-soft: #4d3b0d;
  --green: #2e7d32;
  --pink: #b73e7b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/*<------------RESET------------>*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  transition: background-color 0.3s ease color 0.3s ease;
  background: var(--bg-color);
  color: var(--primary-text);
}

/*<------------APP LAYOUT------------>*/

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/*<------------SIDEBAR------------>*/

.sidebar {
  width: clamp(250px, 18vw, 290px);
  height: 100vh;
  padding: clamp(1.3rem, 1vw, 1.8rem);
  background: var(--sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 1rem;
}

/*<------------LOGO------------>*/

.logo img {
  width: clamp(150px, 12vw, 170px);
  height: auto;
  display: block;
}

/*<------------SECTION------------>*/

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.section-heading h3 {
  font-size: 1rem;
  font-weight: 600;
}

.section-heading i {
  font-size: 0.7rem;
  cursor: pointer;
}

/*<------------LIST------------>*/

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.sidebar-list li {
  padding: 0.25rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 400;
  opacity: 0.7;
  cursor: pointer;
  border-radius: 10px;
  transition: 0.25s;
}

.sidebar-list li:hover {
  background: var(--bg-color);
  color: var(--primary-text);
}

/*<------------BUTTON------------>*/

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s;
}

.sidebar-btn i {
  font-size: 1.6rem;
  color: var(--primary-text);
}

.sidebar-btn span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--secondary-text);
}

.sidebar-btn:hover {
  transform: scale(1.05);
}

/*<------------MAIN CONTENT------------>*/

.main-content {
  flex: 1;
  height: 100%;
  padding: clamp(0.5rem, 0.5vw, 2rem) clamp(1.5rem, 5vw, 8rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/*<------------HEADER------------>*/

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 1rem;
  margin-bottom: 1rem;
}

.main-header h2 {
  font-size: clamp(0.4rem, 1.1vw, 2rem);
  font-weight: 600;
  color: var(--primary-text);
}

.theme-btn {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-btn i {
  font-size: 1.2rem;
  color: #1e293b;
}

/*<------------MENU BUTTON------------>*/

.menu-btn {
  display: none;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.menu-btn i {
  font-size: 1.2rem;
  color: #1e293b;
}

.menu-btn:hover {
  transform: translateY(-2px);
}

/*<------------WELCOME BANNER------------>*/

.welcome-banner {
  position: relative;
  width: 100%;
  height: clamp(170px, 18vw, 210px);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-inline: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1rem;
}

/*<------------VIDEO------------>*/

.welcome-banner video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/*<------------OVERLAY------------>*/

.welcome-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

/*<------------CONTENT------------>*/

.banner-content {
  position: relative;
  height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  z-index: 3;
  max-width: 650px;
}

.banner-content p {
  font-size: clamp(0.9rem, 1vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 4px;
  color: #ff8c42;
  margin-bottom: 0.8rem;
}

.banner-content h1 {
  font-size: clamp(2rem, 2vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  color: #ffffff;
}

.banner-content span {
  color: #ff8c42;
  font-family: cursive;
}

/*<------------STATISTICS------------>*/

.stats {
  display: flex;
  gap: 2rem;
}

.stat-box {
  padding-left: 0.7rem;
  border-left: 3px solid #dcdcdc;
}

.stat-box h3 {
  font-size: clamp(.8rem, 1vw,2rem);
  font-weight: 600;
  color: var(--secondary-text);
}

.stat-box span {
  font-size: clamp(.9rem, 1.2vw, 2rem);
  font-weight: 500;
  opacity: 0.6;
}

/*<------------CONTENT GRID------------>*/

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 3vw, 4rem);
  margin-top: 1rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/*<------------SECTION TITLE------------>*/

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title h2 {
  font-size: clamp(0.2rem, 1.9vw, 2.8rem);
  font-weight: 600;
  color: var(--primary-text);
}

.section-title a {
  font-size: 1rem;
  color: var(--secondary-text);
  text-decoration: none;
}

/*<------------CARD TOP------------>*/

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

.card-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-check i {
  font-size: 0.7rem;
  color: #ea6a9e;
}

/*<------------PROJECTS------------>*/

.project-container {
  display: flex;
  gap: 1.6rem;
  margin-top: 0.5rem;
}

.project-card {
  position: relative;
  width: clamp(12rem, 14vw, 20rem);
  height: clamp(18rem, 19vw, 220rem);
  padding: 1.4rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  box-shadow: var(--shadow);
  transition: 0.25s;
}

.project-card:hover {
  transform: translateY(-6px);
}

.card-one {
  background: #e6679c;
}

.card-two {
  background: #ffd15b;
  transform: rotate(7deg);
}

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

.card-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-check i {
  font-size: 0.65rem;
  color: #e6679c;
}

.card-menu {
  font-size: 1rem;
}

.card-content h3 {
  font-size: clamp(1.3rem, 1.6vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.card-content p {
  font-size: 0.95rem;
  opacity: 0.85;
}

.card-footer span {
  font-size: 0.85rem;
}

.progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.progress {
  width: 30%;
  height: 100%;
  background: #fff;
  border-radius: 20px;
}

/*<------------SCHEDULED------------>*/
.scheduled-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
}

.schedule-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.4rem;
}

.schedule-list::-webkit-scrollbar {
  display: none;
}

.schedule-list:empty {
  flex: 0;
  height: 0;
}

.add-task-btn {
  width: 100%;
  height: 58px;
  margin-top: 1rem;
  flex-shrink: 0;
  background: transparent;
  border: 2px dashed #a3a1a1;
  border-radius: 22px;
  font-size: 1.1rem;
  color: var(--secondary-text);
  cursor: pointer;
  transition: 0.25s;
}

.add-task-btn:hover {
  background: var(--surface);
  color: var(--primary-text);
  transform: translateY(-0.2rem);
}

/*<------------TASK CARD------------>*/

.task-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 1rem;
  border-left: 5px solid var(--status-color);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: 0.25s;
}

.task-card:hover {
  transform: translateY(-4px);
}

/*<------------HEADER------------>*/

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

.task-project {
  font-size: 0.95rem;
  color: var(--primary-text);
}

.task-project span {
  color: #5f6672;
  font-weight: 500;
}

/*<------------TASK TITLE------------>*/

.task-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-text);
}

/*<------------ACTIONS------------>*/

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/*<------------STATUS------------>*/

.status-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  background: var(--status-bg);
  color: var(--status-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-color);
}

/*<------------ICONS------------>*/

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--primary-text);
  cursor: pointer;
  border-radius: 8px;
  transition: 0.25s;
}

.icon-btn:hover {
  background: var(--bg-color);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
}

.task-modal {
  width: 520px;
  max-width: 100%;
  background: var(--bg-color);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--shadow);
  animation: popup 0.25s ease;
}

@keyframes popup {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--primary-text);
}

.close-modal {
  width: 42px;
  height: 42px;
  border: none;
  background: var(--bg-color);
  color: var(--primary-text);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.25s;
}

.close-modal:hover {
  background: var(--surface);
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-text);
}

.form-group label i {
  font-size: 0.85rem;
  color: #f4b400;
}

.form-error {
  display: none;
  align-items: center;
  gap: 0.4rem;
  margin: -0.2rem 0 0;
  font-size: 0.8rem;
  color: #d94d4d;
}

.form-error i {
  font-size: 0.75rem;
}

.form-group.error .form-error {
  display: flex;
}

.form-group.error input {
  border-color: #d94d4d;
}

.task-form input {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #e5e7eb;
  background-color: var(--surface);
  color: var(--primary-text);
  border-radius: 12px;
  font-size: 0.95rem;
  outline: none;
  transition: 0.25s;
}

.task-form input:focus {
  border-color: #ffb400;
}

.project-options {
  display: flex;
  gap: 1rem;
}

.project-option {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--primary-text);
  cursor: pointer;
  font-weight: 500;
  transition: 0.25s;
}

.project-option.active {
  background: #ffd15b;
  font-weight: 600;
  color: var(--primary-text);
}

.status-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-option {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.25s;
}

.pending {
  background: #fff4cf;
  color: #aa7600;
}

.progress {
  background: #e5f7da;
  color: #4e8a12;
}

.completed {
  background: #ffe1ee;
  color: #d94d88;
}

.task-card[data-status="pending"] {
  --status-color: #aa7600;
  --status-bg: #fff4cf;
}

.task-card[data-status="in-progress"] {
  --status-color: #4e8a12;
  --status-bg: #e5f7da;
}

.task-card[data-status="completed"] {
  --status-color: #d94d88;
  --status-bg: #ffe1ee;
}

.status-option.active {
  font-weight: 500;
  font-size: 1rem;
}

.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.cancel-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  background: var(--bg-color);
  color: var(--primary-text);
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.cancel-btn:hover {
  background-color: var(--surface);
}

.save-btn {
  padding: 0.8rem 1.6rem;
  border: none;
  background: #ffb400;
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.25s;
}

.save-btn:hover {
  transform: translateY(-2px);
}
/*<------------TABLET------------>*/

@media screen and (max-width: 1024px) {
  .main-content {
    padding: 1rem 1.5rem;
  }

  .sidebar {
    width: 220px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
    padding-bottom: 1rem;
  }

  .project-container {
    display: flex;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 1rem;
  }

  .project-card {
    flex: 1;
    width: auto;
    max-width: 230px;
    min-width: 170px;
  }

  .projects-section,
  .scheduled-section {
    width: 100%;
  }

  .schedule-list {
    flex: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 1rem;
  }

  .welcome-banner {
    height: 180px;
  }

  .banner-content h1 {
    font-size: 2rem;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

  .main-header h2 {
    font-size: 1rem;
  }

  .stats {
    gap: 1rem;
    flex-wrap: wrap;
  }

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

  .task-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }

  .project-card {
    width: 190px;
    height: 270px;
  }
}

/*<------------MOBILE------------>*/

@media screen and (max-width: 768px) {
  body {
    overflow: auto;
  }

  .app-container {
    display: block;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 260px;
    height: 100vh;
    padding: 1rem;
    background: var(--sidebar);
    border-right: 1px solid #ddd;
    transition: 0.3s;
    z-index: 999;
    animation: slideRight 0.3s ease;
  }

  .sidebar.active {
    left: 0;
  }

  .menu-btn {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .main-content {
    height: auto;
    overflow: visible;
    padding: 1rem;
  }

  .main-header {
    display: grid;
    grid-template-columns: 45px 1fr 45px;
    align-items: center;
    gap: 0.8rem;
    padding: 0;
  }

  .main-header h2 {
    text-align: center;
    font-size: 1rem;
  }

  .theme-btn {
    width: 40px;
    height: 40px;
  }

  .welcome-banner {
    height: 170px;
    padding: 1.2rem;
  }

  .banner-content {
    height: 110px;
  }

  .banner-content h1 {
    font-size: 1.6rem;
  }

  .banner-content p {
    font-size: 0.75rem;
  }

  .stats {
    display: flex;
    gap: 1rem;
  }

  .content-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow: visible;
  }

  .project-container {
    display: flex;
    gap: 0.75rem;
  }

  .project-card {
    flex: 1;
    width: auto;
    min-width: 140px;
    height: 220px;
  }

  .card-two {
    transform: rotate(3deg);
  }

  .card-content h3 {
    font-size: 1.2rem;
  }

  .card-content p {
    font-size: 0.8rem;
  }

  .card-footer span {
    font-size: 0.7rem;
  }

  .section-title {
    margin-bottom: 1rem;
  }

  .section-title h2 {
    font-size: 1.25rem;
  }

  .section-title a {
    font-size: 0.85rem;
  }

  .scheduled-section {
    height: auto;
  }

  .schedule-list {
    flex: none;
    overflow: visible;
    padding-right: 0;
    margin-bottom: 1rem;
  }

  .task-card {
    padding: 0.8rem;
  }

  .task-title {
    font-size: 1rem;
  }

  .task-project {
    font-size: 0.8rem;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
  }

  .status-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .add-task-btn {
    height: 50px;
    font-size: 0.95rem;
  }

  .modal-overlay {
    padding: 1rem;
    justify-content: center;
    align-items: flex-end;
  }

  .task-modal {
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    border-radius: 22px 22px 0 0;
    padding: 1.5rem;
    animation: slideUp 0.3s ease;
  }

  .project-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .form-buttons {
    flex-direction: column;
  }

  .cancel-btn,
  .save-btn {
    width: 100%;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  @keyframes slideRight {
    from {
      transform: translateX(100%);
    }

    to {
      transform: translateX(0);
    }
  }
}
