
/* TicketFlow v31.9 - Tasks compact + same style as projects/tickets */

.v31-tasks-page .top{
  align-items:center;
  margin-bottom:18px;
}
.v31-tasks-page .title{
  font-size:36px;
  letter-spacing:.01em;
  line-height:1;
}
.v31-tasks-page .sub{
  font-weight:700;
  color:#65788f;
}

/* Ribbon like projects */
.v31-tasks-page .ribbon-shell{
  display:grid;
  gap:16px;
}
.v31-tasks-page .ribbon-card{
  border-radius:18px!important;
  box-shadow:0 14px 34px rgba(15,47,77,.08)!important;
  border:1px solid #d5e1ef!important;
}
.v31-tasks-page .ribbon-head{
  padding:12px 16px!important;
  background:#fff!important;
}
.v31-tasks-page .ribbon-tabs{
  gap:10px!important;
}
.v31-tasks-page .ribbon-tab{
  border-radius:999px!important;
  padding:10px 16px!important;
  border:1px solid #c9d8ea!important;
  background:#fff!important;
  color:#0f2f4d!important;
  font-weight:900!important;
}
.v31-tasks-page .ribbon-tab.active{
  background:#1f5f9f!important;
  border-color:#1f5f9f!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(31,95,159,.18)!important;
}
.v31-tasks-page .ribbon-actions .btn,
.v31-tasks-page .btn.secondary{
  border-radius:12px!important;
}

/* Compact task filter */
.v31-task-filter-card{
  padding:14px 16px!important;
  border-radius:18px!important;
  margin-bottom:16px!important;
  background:#fff!important;
  border:1px solid #d5e1ef!important;
}
.v31-task-filter-grid{
  display:grid!important;
  grid-template-columns:minmax(280px,1.35fr) minmax(145px,.55fr) minmax(190px,.7fr) minmax(190px,.7fr) minmax(180px,.65fr) minmax(210px,.7fr)!important;
  gap:12px!important;
  align-items:end!important;
}
.v31-task-filter-grid .field{
  margin:0!important;
}
.v31-task-filter-grid label{
  font-weight:900!important;
  color:#0f2f4d!important;
  margin-bottom:6px!important;
}
.v31-task-filter-grid input,
.v31-task-filter-grid select{
  min-height:42px!important;
  height:42px!important;
  border-radius:12px!important;
  padding:8px 12px!important;
  font-weight:700!important;
}
.v31-task-filter-actions{
  margin-top:12px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}
.v31-task-filter-actions .check,
.v31-task-filter-actions .task-closed-toggle{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  border:1px solid #d5e1ef!important;
  border-radius:999px!important;
  background:#fff!important;
  padding:8px 12px!important;
  font-weight:800!important;
  color:#0f2f4d!important;
}
.v31-task-filter-actions .task-closed-toggle.is-active,
.v31-task-filter-actions .check:hover,
.v31-task-filter-actions .task-closed-toggle:hover{
  background:#eef5fd!important;
  border-color:#9ebce2!important;
  color:#1f5f9f!important;
}
.v31-task-filter-actions input[type="checkbox"]{
  width:16px;
  height:16px;
}
.v31-task-filter-actions .btn{
  min-height:40px!important;
  border-radius:12px!important;
  padding:10px 16px!important;
}

/* Workspace dropdown with checkboxes */
.v31-task-check-dropdown{
  position:relative;
  width:100%;
}
.v31-task-check-dropdown-toggle{
  width:100%;
  min-height:42px;
  border:1px solid #c9d8ea;
  border-radius:12px;
  background:#fff;
  padding:8px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-weight:800;
  color:#0f2f4d;
  cursor:pointer;
}
.v31-task-check-dropdown-toggle:after{
  content:"▾";
  color:#1f5f9f;
  font-size:12px;
}
.v31-task-check-dropdown.open .v31-task-check-dropdown-toggle:after{
  transform:rotate(180deg);
}
.v31-task-check-dropdown-panel{
  position:absolute;
  z-index:300;
  left:0;
  right:0;
  top:calc(100% + 6px);
  background:#fff;
  border:1px solid #d5e1ef;
  border-radius:14px;
  box-shadow:0 16px 36px rgba(15,47,77,.16);
  padding:8px;
  display:none;
  max-height:260px;
  overflow:auto;
}
.v31-task-check-dropdown.open .v31-task-check-dropdown-panel{
  display:block;
}
.v31-task-check-option{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 9px;
  border-radius:10px;
  cursor:pointer;
  font-weight:800;
  color:#0f2f4d;
}
.v31-task-check-option:hover{
  background:#eef5fd;
}
.v31-task-check-option input{
  width:16px;
  height:16px;
}
.v31-task-check-dropdown-native{
  display:none!important;
}

/* Task list same row/card feel as projects/tickets */
.v31-task-list-card{
  overflow:hidden;
  padding:0!important;
  border-radius:18px!important;
  border:1px solid #d5e1ef!important;
  background:#fff!important;
  box-shadow:0 14px 34px rgba(15,47,77,.08)!important;
}
.v31-task-list-card .section-head{
  padding:16px 18px;
  margin:0!important;
  border-bottom:1px solid #e4edf7;
  background:#fbfdff;
}
.v31-task-table-wrap{
  overflow:auto!important;
}
.v31-task-table{
  width:100%;
  border-collapse:separate!important;
  border-spacing:0!important;
  margin:0!important;
}
.v31-task-table tbody{
  display:block;
}
.v31-task-table tr{
  display:grid;
  grid-template-columns:minmax(280px,1.35fr) minmax(180px,.75fr) minmax(170px,.7fr) 120px minmax(260px,1.25fr) 130px;
  gap:12px;
  align-items:center;
}
.v31-task-table tr:first-child{
  background:#f7fafe;
  border-bottom:1px solid #e4edf7;
  color:#0f2f4d;
  font-weight:900;
}
.v31-task-table tr[data-task-row]{
  min-height:72px;
  border-bottom:1px solid #edf2f8;
  background:#fff;
  cursor:pointer;
}
.v31-task-table tr[data-task-row]:hover{
  background:#f8fbff;
}
.v31-task-table th,
.v31-task-table td{
  display:block;
  padding:13px 0!important;
  border:0!important;
  min-width:0;
}
.v31-task-table th:first-child,
.v31-task-table td:first-child{
  padding-left:18px!important;
}
.v31-task-table th:last-child,
.v31-task-table td:last-child{
  padding-right:18px!important;
}
.v31-task-table td:first-child{
  color:#182d45;
  font-weight:900;
  font-size:16px;
}
.v31-task-table td:first-child .muted{
  display:block;
  font-size:12px;
  font-weight:700;
  margin-top:3px;
}
.v31-task-table .badge{
  display:inline-flex;
  justify-content:center;
  min-width:82px;
  border-radius:999px;
  padding:7px 12px;
  background:#d9edb6;
  color:#5f7e33;
  font-weight:900;
  text-transform:uppercase;
}
.v31-task-table .task-source-pill{
  display:inline-flex;
  border-radius:999px;
  padding:6px 10px;
  background:#eef5fd;
  color:#1f5f9f;
  font-weight:900;
  text-decoration:none;
}
.v31-task-table .last-action-pill{
  background:#eef5fd!important;
  color:#1f5f9f!important;
  border:1px solid #cfe0f3!important;
}
.v31-task-table .last-action-cell strong{
  font-size:13px;
}
.v31-task-table .last-action-text{
  max-width:100%!important;
}
.v31-task-table .extra-col,
.v31-task-table .row-extra{
  display:none!important;
}
.v31-task-table-wrap.show-extra .extra-col{
  display:block!important;
}
.v31-task-table-wrap.show-extra .row-extra{
  display:grid!important;
  grid-template-columns:1fr!important;
}
.v31-task-table .row-extra td{
  padding:14px 18px!important;
  background:#f8fbff!important;
}
.v31-task-table tr.task-closed-row{
  opacity:.68;
}
.v31-task-table tr.task-closed-row td{
  background:transparent!important;
}

/* Creation form also more compact */
.v31-tasks-page .ribbon-panel{
  padding:16px!important;
}
.v31-tasks-page .compact-form .row{
  gap:12px!important;
}
.v31-tasks-page .compact-form .field{
  margin-bottom:10px!important;
}
.v31-tasks-page .compact-form input,
.v31-tasks-page .compact-form select,
.v31-tasks-page .compact-form textarea{
  border-radius:12px!important;
}
.v31-tasks-page .compact-form textarea{
  min-height:86px!important;
}

@media(max-width:1300px){
  .v31-task-filter-grid{
    grid-template-columns:1fr 1fr 1fr!important;
  }
  .v31-task-table{
    min-width:1160px;
  }
  .v31-task-list-card{
    overflow:auto;
  }
}
@media(max-width:850px){
  .v31-task-filter-grid{
    grid-template-columns:1fr!important;
  }
  .v31-tasks-page .title{
    font-size:30px;
  }
}
