:root{
  --accent:#4f46e5;
  --bg:#E2E2E2;
  --card:#ffffff;
  --muted:#64748b;
  --radius:10px;
  --gap:18px;
}

*{
  box-sizing:border-box;
}

.hidden{
  display:none !important;
}

body{
  margin:0;
  font-family:Inter,system-ui;
  background:var(--bg);
  color:#0f172a;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  background:var(--card);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 22px;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
  flex-wrap:wrap;
  gap:10px;
}

.brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:600;
}

.brand-icon{
  width:20px;
  height:20px;
}

.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.user-menu-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.auth-btn{
  min-width:140px;
  min-height:36px;
}

.avatar-btn{
  width:36px;
  height:36px;
  border:1px solid #d1d5db;
  padding:0;
  border-radius:999px;
  background:#eef2ff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 1px 6px rgba(0,0,0,.08);
  overflow:hidden;
  position:relative;
  flex:0 0 auto;
}

.avatar-btn:hover{
  transform:translateY(-1px);
}

.user-avatar-img,
.user-avatar-fallback{
  width:100%;
  height:100%;
  border-radius:999px;
}

.user-avatar-img{
  object-fit:cover;
  display:block;
}

.user-avatar-fallback{
  display:none;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, #4f46e5, #818cf8);
  color:#fff;
  font-weight:700;
  font-size:15px;
}

.user-menu{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:230px;
  background:#fff;
  border-radius:14px;
  box-shadow:0 14px 40px rgba(15,23,42,.16);
  border:1px solid rgba(148,163,184,.22);
  padding:12px;
  z-index:50;
}

.menu-logout{
  width:100%;
  border:0;
  border-radius:10px;
  background:#eef2f5;
  color:#0f172a;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  font:inherit;
}

.menu-logout:hover{
  background:#e2e8f0;
}

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

.mode{
  border:0;
  background:#f1f5f9;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
}

.mode:hover{
  background:#e0e7ff;
}

.mode.active{
  background:var(--accent);
  color:white;
}

.mode.active:hover{
  background:#6666ff;
}

.primary{
  background:var(--accent);
  color:white;
  border:0;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
}

.primary:hover{
  background:#6666ff;
}

.ghost{
  background:#f1f5f9;
  border:0;
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
}

.ghost:hover{
  background:#e0e7ff;
}

.board{
  display:flex;
  gap:var(--gap);
  padding:20px;
  align-items:flex-start;
  overflow-x:auto;
  flex:1;
}

.column{
  background:var(--card);
  border-radius:var(--radius);
  padding:12px;
  display:flex;
  flex-direction:column;
  min-width:240px;
  flex:1 1 0;
  box-shadow:0 6px 22px rgba(0,0,0,.05);
  min-height:170px;
}

.column-header{
  display:flex;
  justify-content:space-between;
  margin-bottom:12px;
  padding:5px 5px 10px 5px;
  font-weight:900;
  border-bottom:2px solid #efefef;
}

.column-controls{
  display:flex;
  gap:6px;
}

.column-controls .icon{
  background:#eef2ff;
}

.column-controls .icon:hover{
  background:#e0e7ff;
  color:#3730a3;
}

.column-controls .add-task{
  color:#ffffff;
  background:#4f46e5;
  order:3;
}

.column-controls .add-task:hover{
  color:#ffffff;
  background:#6666ff;
}

.add-task{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px 10px 4px 6px !important;
  font-size:13px;
}

.icon{
  background:transparent;
  border:0;
  cursor:pointer;
  padding:6px;
  border-radius:6px;
  color:var(--muted);
}

.icon:hover{
  background:#f1f5f9;
  color:var(--accent);
}

.task-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex-grow:1;
  min-height:50px;
  padding-bottom:12px;
}

.task{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#eef2f5;
  padding:10px;
  border-radius:8px;
}

.task:hover{
  background:#e6eef4;
}

.task-left{
  display:flex;
  gap:10px;
  align-items:center;
}

.task-title.done{
  text-decoration:line-through;
  opacity:.6;
}

.task.dragging-active{
  background:#e6ecff;
  border:1px solid #4f46e5;
  opacity:0.9;
}

.task.dragging-placeholder{
  background:#e6ecff;
  border:1px dashed #4f46e5;
  min-height:40px;
}

.footer{
  text-align:center;
  padding:18px;
  font-size:13px;
  color:var(--muted);
}

.footer a{
  color:var(--accent);
  text-decoration:none;
  font-weight:500;
}

.footer a:hover{
  text-decoration:underline;
}

.task-left input[type="checkbox"]{
  position:relative;
  cursor:pointer;
}

.task-left input[type="checkbox"]::before{
  content:"";
  position:absolute;
  inset:-8px;
}

.task-title{
  cursor:grab;
  user-select:none;
}

.task:active .task-title{
  cursor:grabbing;
}

.login-mobile{
  display:none;
}

.login-desktop{
  display:inline;
}


/* Mobile responsive tweaks */

@media (max-width:700px){
  .brand{
    display:none;
  }

  .actions{
    gap:8px;
  }

  .auth-btn{
    min-width:auto;
  }

  .label-desktop{
    display:none;
  }

#btnReset .label-desktop,
#btnAddColumn .label-desktop{
  display:none;
}

  .login-mobile{
    display:inline;
  }
  
.login-desktop{
  display:none;
}
  .ghost,
  .primary{
    padding:8px 10px;
    min-height:36px;
  }

  .ghost .ti,
  .primary .ti{
    font-size:18px;
    vertical-align:middle;
  }

  .board{
    padding:14px;
  }
  
}


.user-meta{
  padding:2px 2px 10px;
  margin-bottom:10px;
  border-bottom:1px solid #e5e7eb;
}

.user-name{
  font-size:14px;
  font-weight:600;
  color:#0f172a;
  line-height:1.2;
}

.user-email{
  margin-top:2px;
  font-size:12px;
  color:#64748b;
  word-break:break-word;
}


.label-desktop{
  display:inline;
}


.user-menu-wrap[hidden],
#btnAvatar[hidden] {
  display:none !important;
}
