:root{
  --bg: #efece8;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e6e8ee;

  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-soft: 0 10px 22px rgba(15, 23, 42, .10);

  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --accent: #00b894;
  --accent-dark: #009c7e;

  --high: #ef4444;
  --medium: #f59e0b;
  --low: #10b981;
}

*{ box-sizing: border-box; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.app{
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 18px 60px;
}

.brand{
  text-align: center;
  margin: 6px 0 18px;
}
.brand h1{
  margin: 0;
  font-size: 44px;
  letter-spacing: -0.02em;
}

/* Shared panel */
.panel{
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

/* Form panel */
.form-panel{
  max-width: 860px;
  margin: 0 auto 26px;
  padding: 44px 54px;
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(0,0,0,.10);
}

.taskflow{
  margin: 0;           
  padding: 0;           
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: 0;

  display: grid;
  gap: 22px;
}

.form-grid{
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
}

.input-title,
.input-priority,
.input-desc{
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  outline: none;
}

.input-title:focus,
.input-priority:focus,
.input-desc:focus{
  border-color: rgba(0,184,148,.65);
  box-shadow: 0 0 0 4px rgba(0,184,148,.12);
}

.input-desc{
  grid-column: 1 / -1;
  min-height: 160px;
  resize: none;
}

.input-title { grid-column: 1; }
.input-priority { grid-column: 2; }
.input-desc { grid-column: 1 / -1; }

.input-title,
.input-priority,
.input-desc{
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
}


.btn-create {
  grid-column: 1 / -1;
  justify-self: center;     
  margin-top: 8px;

  padding: 14px 26px;
  background: #00b894;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  color: white;
  box-shadow: 0 12px 26px rgba(0,184,148,.25);
}

.btn-create:hover{
  background: #009c7e;
}


.btn-plus{
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: 18px;
  line-height: 1;
}

/* Toolbar (filter + stats) */
.toolbar{
  max-width: 980px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin: 0 auto 26px;
  padding: 16px 18px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-around;
}

.toolbar-left{
  display: flex;
  align-items: center;
  gap: 12px;
}




/* Stats text */
.stats{
  margin-left: auto;       
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;       
  justify-content: flex-end;
  white-space: nowrap;
}

.stat{
  font-size: 14px;
  color: var(--text);
}
.stat.muted{ color: var(--muted); }

.stat-item{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.stat-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* Cards grid */
.container{
  max-width: 980px;
  margin: 0 auto;
}

.cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 950px){
  .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px){
  .form-grid{ grid-template-columns: 1fr; }
  .cards{ grid-template-columns: 1fr; }
  .toolbar{ flex-direction: column; align-items: flex-start; }
  .stats{ justify-content: flex-start; }
}


.card{
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  display: grid;
  gap: 12px;
  min-height: 190px;
  position: relative; 
  padding-top: 22px; 
}

.card .title{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  padding-right: 110px;
  margin-bottom: 4px;
}


.card .priority{
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  position: absolute; 
  top: 16px;           
  right: 16px;
}


.card .priority::before{
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  margin-right: 8px;
}


.priority-high { background: #fee2e2; color: #991b1b; }
.priority-high::before { background: var(--high); }

.priority-medium { background: #fef3c7; color: #92400e; }
.priority-medium::before { background: var(--medium); }

.priority-low { background: #d1fae5; color: #065f46; }
.priority-low::before { background: var(--low); }




.card p{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin-top: 2px;
  margin-bottom: 6px;
  justify-self: center;
}

.delete-btn{
 
  justify-self: center; 
  align-self: end;
  margin-top: 10px;


  width: auto;
  min-width: 130px;
  padding: 10px 14px;
  border-radius: 12px;

  
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: #fff;
  border: 1px solid #fca5a5;      
  color: #dc2626;                 

  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s ease;
}

.delete-btn:hover{
  background: #fff1f2;            
  border-color: #f87171;
  box-shadow: 0 10px 18px rgba(220, 38, 38, .10);
}

.delete-btn:active{
  transform: translateY(1px);
}

.delete-icon{
  width: 16px;
  height: 16px;
  opacity: .9;
}


/* Empty state */
.empty-state{
  text-align: center;
  margin: 60px auto 0;
  color: var(--muted);
}

.empty-icon{
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 34px;
  box-shadow: var(--shadow-soft);
}

.empty-state h2{
  margin: 0;
  color: var(--text);
}
.empty-state p{
  margin: 10px 0 0;
}

/* ===== Custom Filter Dropdown  ===== */
.filter-dd{ position: relative; }

.filter-btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 44px;
  padding: 0 14px;
  border-radius: 999px;

  background: #fff;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
}

.filter-btn:hover{
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
  border-color: #94a3b8;
}

.filter-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,184,148,.14);
  border-color: rgba(0,184,148,.60);
}

.filter-btn-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: .95;
}

.filter-caret{
  margin-left: 10px;
  color: var(--muted);
  font-size: 14px;
}

.filter-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 290px;

  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,23,42,.14);
  padding: 8px;
  z-index: 50;
}

.filter-group{ padding: 6px; }
.filter-group + .filter-group{ border-top: 1px solid #eef2f7; }

.filter-group-title{
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
  padding: 6px 10px;
}

.filter-item{
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr 18px;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-align: left;
}

.filter-item:hover{ background: #f1f5f9; }
.filter-item.is-active{ background: #eef2f7; }

.item-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: .95;
}

.item-check{
  text-align: right;
  color: var(--muted);
  font-weight: 900;
}

/* Priority dots */
.prio-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.prio-dot.high{ background: var(--high); }
.prio-dot.medium{ background: var(--medium); }
.prio-dot.low{ background: var(--low); }


/* ===== Card Status Dropdown ===== */
.status-dd{ justify-self: center; position:relative;}

.status-btn{
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 40px;                 
  padding: 0 14px;
  border-radius: 999px;         

  background: #f8fafc;         
  border: 1px solid #e2e8f0;    
  cursor: pointer;

  font-weight: 800;
  font-size: 14px;
}

.status-btn:hover{
  border-color: #94a3b8;
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
}

.status-btn:focus{
  outline: none;
  box-shadow: 0 0 0 4px rgba(0,184,148,.14);
  border-color: rgba(0,184,148,.60);
}

.status-btn-icon{
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.status-caret{
  margin-left: auto;
  color: var(--muted);
}

.status-menu{
  position: absolute;
  left: 0;
  right: 0;

  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15,23,42,.14);
  padding: 8px;
  z-index: 40;
}

.status-item{
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr 18px;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.status-item:hover{ background: #f1f5f9; }
.status-item.is-active{ background: #eef2f7; }

.themeSelector {
  border: unset;
  background-color: transparent;
  position: fixed;
  top: 10px;
  right: 10px;
  cursor: pointer;

  img {
    width: 40px;
    height: auto;
  }
}

body.dark-mode {
  background-color: #171717;
  color: #fff;

  .form-panel {
    background-color: #606060;

    input,
    select,
    textarea {
      background-color: rgba(255, 255, 255, 0.5);
    }

    option {
      color: white;
      background-color: rgb(175, 175, 175);
    }
  }

  /* Priority dropdown dark mode */
  .form-panel .filter-btn {
    background-color: #606060;
    color: white;
    border-color: #888;
  }

  .form-panel .filter-btn span {
    color: white;
  }

  .form-panel .filter-menu {
    background-color: #606060;
    color: white;
    border-color: #888;
  }

  .form-panel .filter-group-title {
    color: white;
  }

  .form-panel .filter-item {
    background-color: transparent;
    color: white;
  }

  .form-panel .filter-item:hover {
    background-color: #707070;
  }

  .form-panel .filter-item.is-active {
    background-color: #808080;
  }

  .form-panel .item-check {
    color: white;
  }
  
  .toolbar {
    background-color: #606060;
    color: white;

    .stats {
      img {
        filter: invert(100%);
      }

      span {
        color: white;
      }
    }
    button {
      background-color: #606060;
      color: white;

      span {
        color: white;
      }

      img {
        filter: invert(100%);
      }
    }

    .filter-menu {
      background-color: #606060;
      color: white;

      .filter-group-title{
        color: white;
      }
    }

    .filter-item:hover {
    background-color: #707070;
  }

    .filter-item.is-active {
    background-color: #808080;
  }

  .filter-item {
    background-color: transparent;
    color: white;
  }
   

  }

  .themeSelector {
    filter: invert(100%);
  }

  .card {
    background-color: #606060;
    color: white;

    p {
      color: white;
    }

    .status-btn {
      background-color: #606060;
      color: white;

      span {
        color: white;
      }

      img {
        filter: invert(100%);
      }
    }

    .delete-btn {
      background-color: #d3d3d3;
      color: #f63636;
    }

    .status-menu {
      background-color: #606060;
      color: white;
    }

    .status-item.is-active{
      background-color: #606060;
      color: white;

      img {
        filter: invert(100%);
      }

      span {
        color: white;
      }
    }

    .status-item {
      background-color: #606060;
      color: white;

      img {
        filter: invert(100%);
      }
    }
  }

}

