* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  /* Tinte suave en la esquina superior izquierda según la hora (t-morning/afternoon/night) */
  background: radial-gradient(640px 420px at -60px -60px, var(--daytint, transparent) 0%, rgba(246, 247, 249, 0) 70%) no-repeat fixed, #f6f7f9;
  color: #1e2330;
  -webkit-font-smoothing: antialiased;
}
body.t-morning { --daytint: #fff3c9; }
body.t-afternoon { --daytint: #ffdca3; }
body.t-night { --daytint: #d6cdf4; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 6px;
}
h1 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}
.title-wrap {
  position: relative;
}
.title-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 3px 6px;
  margin: -3px -6px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.title-btn:hover {
  background: #eceef3;
}
#title {
  font-size: 20px;
  font-weight: 600;
  color: #1e2330;
}
.title-caret {
  display: inline-flex;
  align-items: center;
  color: #9aa1ac;
}
.title-btn.no-menu {
  cursor: default;
}
.title-btn.no-menu:hover {
  background: none;
}
.title-btn.no-menu .title-caret {
  display: none;
}
.board-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(20, 30, 50, 0.13);
  padding: 5px;
  z-index: 50;
  min-width: 190px;
}
.board-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 7px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: #2b3340;
  cursor: pointer;
}
.board-item:hover {
  background: #f3f4f7;
}
.board-item.active {
  background: #eeeffc;
  color: #5145cd;
  font-weight: 600;
}
.board-lock {
  margin-left: auto;
  font-size: 12px;
}
.email-gate {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: min(380px, 92vw);
  box-shadow: 0 14px 44px rgba(20, 30, 50, 0.22);
}
.eg-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e2330;
  margin-bottom: 14px;
}
.eg-boards {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: #f1f3f6;
  border-radius: 10px;
  padding: 3px;
}
.eg-board {
  flex: 1;
  border: 0;
  background: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: #6b7480;
  cursor: pointer;
}
.eg-board.active {
  background: #fff;
  color: #1e2330;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08);
}
.eg-sub {
  font-size: 13px;
  color: #6b7480;
  margin: 6px 0 16px;
}
.eg-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7dbe0;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.eg-input:focus {
  border-color: #5145cd;
}
.eg-err {
  font-size: 12px;
  color: #e5484d;
  margin-top: 8px;
}
.eg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.eg-cancel {
  background: none;
  border: 0;
  color: #6b7480;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 9px 14px;
}
.eg-ok {
  background: #5145cd;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.eg-ok:hover {
  background: #443abc;
}
.refresh {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e3e6ea;
  background: #fff;
  color: #5a6472;
  font-size: 16px;
  cursor: pointer;
}
.refresh:hover {
  border-color: #c7ccd3;
}
.viewtoggle {
  display: flex;
  gap: 2px;
  background: #eceef3;
  border-radius: 9px;
  padding: 2px;
}
.vbtn {
  border: 0;
  background: transparent;
  color: #6b7480;
  font-size: 13px;
  font-family: inherit;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.vbtn.active {
  background: #fff;
  color: #1e2330;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08);
}
.tl-zoom {
  display: flex;
  gap: 0;
  padding: 12px 18px 10px;
}
.tl-zbtn {
  border: 1px solid #e3e6ea;
  background: #fff;
  color: #6b7480;
  font-size: 12px;
  font-family: inherit;
  padding: 5px 14px;
  cursor: pointer;
}
.tl-zbtn:first-child {
  border-radius: 8px 0 0 8px;
}
.tl-zbtn:last-child {
  border-radius: 0 8px 8px 0;
}
.tl-zbtn + .tl-zbtn {
  border-left: 0;
}
.tl-zbtn.active {
  background: #5145cd;
  color: #fff;
  border-color: #5145cd;
}
.tl2 {
  overflow-x: auto;
  padding: 0 0 40px;
}
.tl2-inner {
  position: relative;
}
.tl2-axis {
  position: relative;
  height: 28px;
  border-bottom: 1px solid #eceef1;
}
.tl2-gutter {
  position: sticky;
  left: 0;
  z-index: 4;
  display: inline-block;
  width: 150px;
  height: 28px;
  background: #f6f7f9;
  vertical-align: top;
}
.tl-tick {
  position: absolute;
  top: 8px;
  font-size: 11px;
  color: #9aa1ac;
  white-space: nowrap;
}
.tl2-today {
  position: absolute;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: #e5484d;
  opacity: 0.45;
  z-index: 1;
}
.tl2-lane {
  position: relative;
  height: 26px;
  margin-top: 8px;
  display: flex;
  align-items: center;
}
.tl2-lane-h {
  position: sticky;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tl2-lane-name {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
.tl2-add {
  background: transparent;
  border: 0;
  color: #9aa1ac;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.tl2-add:hover {
  color: #5145cd;
}
.tl2-row {
  position: relative;
  height: 30px;
}
.tl2-label {
  position: sticky;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 150px;
  height: 30px;
  background: #fff;
  font-size: 13px;
  color: #1e2330;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 8px;
  box-sizing: border-box;
}
.tl2-bar {
  position: absolute;
  top: 6px;
  height: 18px;
  border-radius: 5px;
  cursor: grab;
  z-index: 1;
}
.tl2-bar:hover {
  filter: brightness(1.08);
}
.tl2-bar.dragging-bar {
  opacity: 0.75;
  cursor: grabbing;
}
.tl-bar2 {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 18px 8px;
}
.tl-bar2-l {
  flex: 1;
  font-size: 13px;
  color: #6b7480;
  font-weight: 500;
}
.tl-zbtn2 {
  width: 30px;
  height: 30px;
  border: 1px solid #e3e6ea;
  background: #fff;
  color: #5a6472;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.tl-zbtn2:hover {
  border-color: #c7ccd3;
  background: #f6f7f9;
}
.tl-gridlayer {
  position: absolute;
  left: 0;
  right: 0;
  top: 28px;
  bottom: 0;
  z-index: 0;
}
.tl-wknd {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #f7f8fa;
}
.tl-gl {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #eef0f3;
}
.tl2-axis {
  z-index: 6;
  background: #f6f7f9;
}
.tl2-gutter {
  z-index: 7;
}
.tl-tick-d {
  position: absolute;
  top: 8px;
  font-size: 11px;
  color: #9aa1ac;
  text-align: center;
}
.tl-tick-m {
  position: absolute;
  top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #5a6472;
}
.tl2-today {
  z-index: 1;
}
.tl2-lane-h {
  z-index: 6;
}
.tl2-label {
  z-index: 5;
  cursor: pointer;
}
.tl2-label:hover {
  color: #5145cd;
}
.tl2-bar {
  z-index: 2;
}
.tl2-barname {
  position: absolute;
  top: 7px;
  font-size: 12px;
  color: #5a6472;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}
.tl2-addrow {
  height: 26px;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.tl2-addrow:hover {
  background: rgba(81, 69, 205, 0.05);
}
.tl3 {
  display: flex;
  align-items: flex-start;
}
.tl3-left {
  flex: 0 0 224px;
  z-index: 5;
  background: #f6f7f9;
}
.tl3-right {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.tl3-canvas {
  position: relative;
}
.tl3-axsp {
  height: 34px;
}
.tl3-axis {
  position: relative;
  height: 34px;
  border-bottom: 1px solid #eceef1;
}
.tl3-group {
  padding: 8px;
  margin: 0 8px 10px;
  border-radius: 12px;
}
.tl3-group-r {
  padding: 8px 0;
  margin: 0 0 10px;
  border-radius: 0;
}
.tl3-ghead {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 4px;
}
.tl3-ghead-r {
  height: 30px;
}
.tl3-gname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl3-gadd-btn {
  background: transparent;
  border: 0;
  color: currentColor;
  opacity: 0.7;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.tl3-gadd-btn:hover {
  opacity: 1;
}
.tl3-card {
  height: 36px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 14px;
  color: #1e2330;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl3-card:hover {
  box-shadow: 0 1px 6px rgba(20, 30, 50, 0.08);
}
.tl3-gadd {
  height: 28px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #6b7480;
  cursor: pointer;
  padding: 0 8px;
}
.tl3-gadd:hover {
  color: #5145cd;
}
.tl3-canvas {
  cursor: pointer;
}
.tl3-axis {
  cursor: default;
}
.board.dash-mode {
  display: block;
  overflow-x: visible;
  padding: 16px 18px 48px;
}
.dash {
  max-width: 760px;
}
.dash-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.dash-filter-l {
  font-size: 13px;
  color: #6b7480;
  margin-right: 2px;
}
.dash-chip {
  border: 1px solid #e3e6ea;
  background: #fff;
  color: #5a6472;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.dash-chip:hover {
  border-color: #c7ccd3;
}
.dash-chip.active {
  background: #5145cd;
  border-color: #5145cd;
  color: #fff;
}
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th {
  text-align: right;
  font-weight: 600;
  color: #8a93a0;
  font-size: 12px;
  padding: 2px 10px 8px;
  border-bottom: 1px solid #edeff2;
}
.dash-table th:first-child {
  text-align: left;
}
.dash-table td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f3f6;
  color: #1e2330;
}
.dash-table td:first-child {
  text-align: left;
  color: #404856;
}
.dash-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
}
.dash-danger {
  color: #e5484d;
  font-weight: 600;
}
.dash-total td {
  font-weight: 700;
  color: #1e2330;
  border-top: 2px solid #e3e6ea;
  border-bottom: none;
}
.dash-hl td {
  background: #f5f3ff;
}
.dash-note {
  font-size: 11px;
  color: #9aa1ac;
  margin-top: 8px;
}
.dash-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.hero-ring {
  position: relative;
  width: 116px;
  height: 116px;
  flex: 0 0 116px;
}
.hero-ring svg {
  width: 116px;
  height: 116px;
  transform: rotate(-90deg);
}
.ring-bg {
  fill: none;
  stroke: #eef0f3;
  stroke-width: 12;
}
.ring-fg {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}
.hero-ring-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-pct {
  font-size: 28px;
  font-weight: 700;
  color: #1e2330;
  line-height: 1;
}
.hero-pct-l {
  font-size: 11px;
  color: #8a93a0;
  margin-top: 3px;
}
.hero-side {
  flex: 1;
  min-width: 0;
}
.hero-title {
  font-size: 17px;
  font-weight: 600;
  color: #1e2330;
}
.hero-sub {
  font-size: 13px;
  color: #6b7480;
  margin: 4px 0 16px;
}
.hero-stats {
  display: flex;
  gap: 28px;
}
.hero-stat-v {
  font-size: 22px;
  font-weight: 700;
  color: #1e2330;
}
.hero-stat-v.danger {
  color: #e5484d;
}
.hero-stat-l {
  font-size: 12px;
  color: #8a93a0;
  margin-top: 1px;
}
.lb {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-row.lb-hl {
  background: #f5f3ff;
  border-radius: 8px;
  margin: -3px -8px;
  padding: 3px 8px;
}
.lb-rank {
  flex: 0 0 22px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #8a93a0;
}
.lb-name {
  flex: 0 0 86px;
  font-size: 14px;
  font-weight: 600;
  color: #1e2330;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-bar {
  flex: 1;
  height: 8px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
  min-width: 40px;
}
.lb-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.lb-pct {
  flex: 0 0 40px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #1e2330;
}
.lb-meta {
  flex: 0 0 132px;
  text-align: right;
  font-size: 12px;
  color: #9aa1ac;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .dash-hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .lb-meta {
    display: none;
  }
}
.dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dash-card {
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 12px;
  padding: 14px 16px;
}
.dash-card-v {
  font-size: 28px;
  font-weight: 600;
  color: #1e2330;
}
.dash-card-l {
  font-size: 13px;
  color: #6b7480;
  margin-top: 2px;
}
.dash-card.danger .dash-card-v {
  color: #e5484d;
}
.dash-card.warn .dash-card-v {
  color: #e0991a;
}
.dash-card.ok .dash-card-v {
  color: #1f8f5f;
}
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
}
.dash-sec {
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.dash-h {
  font-size: 14px;
  font-weight: 600;
  color: #1e2330;
  margin-bottom: 12px;
}
.dash-bars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.dash-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-bar-l {
  flex: 0 0 110px;
  font-size: 13px;
  color: #5a6472;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-bar-track {
  flex: 1;
  height: 8px;
  background: #f1f3f6;
  border-radius: 999px;
  overflow: hidden;
}
.dash-bar-fill {
  display: block;
  height: 100%;
  background: #5145cd;
  border-radius: 999px;
}
.dash-bar-n {
  flex: 0 0 24px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: #1e2330;
}
.dash-prio {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.dash-prio-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-prio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dash-prio-n {
  font-size: 18px;
  font-weight: 600;
  color: #1e2330;
}
.dash-prio-l {
  font-size: 13px;
  color: #6b7480;
}
.dash-empty {
  font-size: 13px;
  color: #9aa1ac;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: #5a6472;
  border: 1px solid #e3e6ea;
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.wa-btn svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 640px) {
  .wa-label {
    display: none;
  }
  .wa-btn {
    padding: 7px 9px;
  }
}
.wa-btn:hover {
  background: #f7f8fa;
  border-color: #c7ccd3;
}
.wa-btn:active {
  background: #eceef3;
}
.wa-btn.copied {
  color: #1fa855;
  border-color: #bfe7d1;
  background: #f3fbf6;
}
.wa-btn.copied .wa-label {
  display: inline;
}
.tl3-barrow {
  height: 36px;
  margin-bottom: 6px;
  position: relative;
}
.tl3-addrow {
  height: 28px;
  cursor: pointer;
}
.tl3-addrow:hover {
  background: rgba(81, 69, 205, 0.05);
}
.tl3-barname {
  position: absolute;
  top: 9px;
  font-size: 12px;
  color: #5a6472;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}
.tl-gridlayer {
  top: 34px;
}
.tl2-today {
  top: 34px;
}
.tl2-bar {
  top: 8px;
  height: 20px;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 50, 0.35);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-form {
  width: 100%;
  max-width: 420px;
  margin: 0;
  box-shadow: 0 12px 40px rgba(20, 30, 50, 0.22);
}
.modal-extra {
  display: flex;
  gap: 8px;
}
.mx-done,
.mx-del {
  background: transparent;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.mx-done {
  color: #1f8f5f;
}
.mx-done:hover {
  background: #eaf6ef;
  border-color: #1f8f5f;
}
.mx-del {
  color: #e5484d;
}
.mx-del:hover {
  background: #fdeaea;
  border-color: #e5484d;
}
.status {
  padding: 2px 18px;
  color: #8a93a0;
  font-size: 14px;
  min-height: 18px;
}
.board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 18px 40px;
  overflow-x: auto;
}
.board.tl-mode {
  display: block;
  overflow-x: visible;
  padding: 0;
}
.col {
  flex: 1 1 300px;
  min-width: 200px;
  max-width: 380px;
  border-radius: 12px;
  padding: 10px;
  background: var(--col-bg, #eef0f4);
}
@media (max-width: 520px) {
  .col {
    flex: 0 0 84vw;
    min-width: 0;
    max-width: 84vw;
  }
}
.qadd-wrap {
  position: relative;
  margin: 2px 0 8px;
}
.qadd {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.55);
  color: #1e2330;
  outline: none;
}
.qadd::placeholder {
  color: #9aa1ac;
}
.qadd:focus {
  border-color: var(--col-fg, #c7ccd3);
  background: #fff;
}
.qadd-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 9px;
  box-shadow: 0 6px 20px rgba(20, 30, 50, 0.14);
  padding: 4px;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
}
.qadd-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 13px;
  font-family: inherit;
  color: #2b3340;
  cursor: pointer;
}
.qadd-opt.hi,
.qadd-opt:hover {
  background: #eef0f4;
}
.col.drop {
  outline: 2px dashed var(--col-fg, #9aa1ac);
  outline-offset: -2px;
}
.col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 6px 10px;
}
.col-name {
  color: var(--col-fg, #5a6472);
  font-weight: 500;
  font-size: 14px;
}
.col-count {
  color: #9aa1ac;
  font-size: 13px;
}
.cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 6px;
}

.card {
  display: flex;
  gap: 10px;
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 12px;
  padding: 12px;
  cursor: grab;
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.15s ease;
}
.card:hover {
  box-shadow: 0 1px 6px rgba(20, 30, 50, 0.07);
}
.card.dragging {
  opacity: 0.45;
}
.card.removing {
  opacity: 0;
  transform: translateX(30px);
}
.check-circle {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #c4cad3;
  background: transparent;
  cursor: pointer;
  margin-top: 1px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f8f5f;
}
.check-circle svg {
  opacity: 0;
}
.check-circle:hover {
  border-color: #1f8f5f;
}
.check-circle:hover svg {
  opacity: 0.55;
}
.note-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c2701a;
  margin-top: 1px;
}
.card-body {
  flex: 1;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.card-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  word-wrap: break-word;
  min-width: 0;
}
.menu-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: #aeb4bd;
  cursor: pointer;
  padding: 2px;
  border-radius: 6px;
  line-height: 0;
  margin-top: 1px;
}
.menu-btn:hover {
  background: #f1f3f6;
  color: #5a6472;
}
.card-notes {
  color: #7a828e;
  font-size: 14px;
  margin-top: 4px;
  white-space: pre-wrap;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-link {
  color: var(--col-fg, #5145cd);
  text-decoration: underline;
  word-break: break-all;
}
.attachs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7480;
  background: #f1f3f6;
  padding: 4px 8px;
  border-radius: 7px;
  max-width: 100%;
}
.att-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prog {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.prog-track {
  flex: 1;
  height: 4px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: var(--col-fg, #5145cd);
  opacity: 0.7;
  border-radius: 999px;
}
.prog-num {
  font-size: 11px;
  color: #aeb4bd;
}
.subs {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sub {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sub-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.6px solid #c4cad3;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.sub.sub-done .sub-check {
  background: #1f8f5f;
  border-color: #1f8f5f;
}
.sub-t {
  font-size: 13px;
  color: #5a6472;
}
.sub.sub-done .sub-t {
  color: #aab0b9;
  text-decoration: line-through;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  margin-top: 10px;
}
.due {
  font-size: 12px;
  color: #7a828e;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}
.tag {
  font-size: 12px;
  color: #6b7480;
  background: #f1f3f6;
  padding: 2px 8px;
  border-radius: 999px;
}
.add {
  margin: 10px 0 2px;
  color: var(--col-fg, #5a6472);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
}
.add.add-top {
  margin: 0 0 8px;
}
.add:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: #edeff2;
}
.add:hover {
  opacity: 1;
}
.add-form {
  margin: 8px 0 2px;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 6px rgba(20, 30, 50, 0.06);
}
.add-title,
.add-desc {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  font-family: inherit;
  background: transparent;
}
.add-title {
  font-size: 16px;
  font-weight: 500;
  color: #1e2330;
}
.add-desc {
  font-size: 14px;
  color: #5a6472;
  resize: vertical;
  min-height: 32px;
}
.add-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.add-title-row .add-title {
  flex: 1;
  width: auto;
  min-width: 0;
}
.note-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  background: #fff;
  color: #9aa1ac;
  cursor: pointer;
}
.note-toggle:hover {
  border-color: #c7ccd3;
  color: #5a6472;
}
.note-toggle.active {
  background: #fff6e3;
  border-color: #f0cd86;
  color: #c2701a;
}
.add-title::placeholder,
.add-desc::placeholder {
  color: #b0b6bf;
}
.add-subs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sub-row {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sub-row-check {
  flex: 0 0 auto;
  accent-color: #1f8f5f;
}
.sub-row-text {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid transparent;
  outline: 0;
  padding: 2px 0;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: #1e2330;
}
.sub-row-text:focus {
  border-bottom-color: #e3e6ea;
}
.sub-row-del {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: #b0b6bf;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 0 4px;
}
.sub-row-del:hover {
  color: #e5484d;
}
.sub-add-btn {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: #6b7480;
  font-size: 13px;
  cursor: pointer;
  padding: 2px 0;
  font-family: inherit;
}
.sub-add-btn:hover {
  color: var(--col-fg, #5145cd);
}
.add-divider {
  height: 1px;
  background: #eef0f3;
  margin: 2px 0;
}
.add-prog {
  display: flex;
  align-items: center;
  gap: 8px;
}
.add-prog-label {
  font-size: 12px;
  color: #7a828e;
  flex: 0 0 auto;
}
.add-progress {
  flex: 1;
  min-width: 0;
  accent-color: var(--col-fg, #5145cd);
}
.add-prog-val {
  font-size: 12px;
  color: #8a93a0;
  flex: 0 0 auto;
  min-width: 34px;
  text-align: right;
}
.add-resp {
  display: flex;
  align-items: center;
  gap: 8px;
}
.add-respi {
  flex: 1;
  min-width: 0;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1e2330;
  outline: none;
}
.add-respi:focus {
  border-color: var(--col-fg, #5145cd);
}
.resp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #5a6472;
}
.resp-av {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.est-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.cmt-title {
  font-size: 12px;
  font-weight: 600;
  color: #5a6472;
  margin-bottom: 8px;
}
.cmt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.cmt-empty {
  font-size: 12px;
  color: #9aa1ac;
}
.cmt-item {
  background: #f5f6f8;
  border-radius: 8px;
  padding: 7px 10px;
}
.cmt-c-text {
  font-size: 13px;
  color: #2b3340;
  white-space: pre-wrap;
  word-break: break-word;
}
.cmt-c-time {
  font-size: 10px;
  color: #9aa1ac;
  margin-top: 3px;
}
.cmt-add {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cmt-name {
  flex: 0 0 90px;
  min-width: 0;
}
.cmt-text {
  flex: 1 1 120px;
  min-width: 0;
}
.cmt-name,
.cmt-text {
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  font-family: inherit;
}
.cmt-send {
  border: 0;
  background: #5145cd;
  color: #fff;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.cmt-send:hover {
  background: #443abc;
}
.cmt-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.add-controls {
  display: flex;
  flex-direction: row;
  gap: 6px;
  flex: 1 1 100%;
}
.add-controls .add-mini {
  flex: 1 1 0;
  min-width: 0;
}
.add-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}
.add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}
.add-grid .add-mini {
  width: 100%;
  box-sizing: border-box;
}
.cmt-toggle {
  background: none;
  border: 0;
  color: var(--col-fg, #5145cd);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0;
}
.cmt-toggle:hover {
  text-decoration: underline;
}
.add-mini {
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  padding: 5px 6px;
  font-size: 12px;
  font-family: inherit;
  background: #fff;
  color: #1e2330;
  outline: none;
  min-width: 0;
}
.add-mini:focus {
  border-color: var(--col-fg, #5145cd);
}
.btn-add {
  background: var(--col-fg, #5145cd);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn-add:hover {
  filter: brightness(0.95);
}
.btn-cancel {
  background: transparent;
  color: #6b7480;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-cancel:hover {
  color: #1e2330;
}
.done-sep {
  font-size: 11px;
  color: #aeb4bd;
  margin: 12px 4px 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card.done-card {
  padding: 8px 12px;
  background: #f3f4f6;
  border-color: #eceef1;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card.done-card:hover {
  box-shadow: none;
}
.dcheck-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 0;
  color: #1f8f5f;
  cursor: pointer;
}
.dcheck-btn:hover {
  color: #0f6e45;
}
.dname {
  color: #9aa1ac;
  text-decoration: line-through;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.empty {
  color: #9aa1ac;
  font-size: 15px;
  padding: 44px 18px;
  text-align: center;
  width: 100%;
}
.menu {
  position: absolute;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(20, 30, 50, 0.12);
  padding: 6px;
  z-index: 50;
  min-width: 170px;
}
.menu-label {
  font-size: 11px;
  color: #9aa1ac;
  padding: 4px 10px;
  letter-spacing: 0.04em;
}
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 14px;
  color: #1e2330;
  cursor: pointer;
  font-family: inherit;
}
.menu-item:hover {
  background: #f1f3f6;
}
.menu-sep {
  height: 1px;
  background: #eef0f3;
  margin: 4px 6px;
}
.menu-del {
  color: #e5484d;
}
.menu-del:hover {
  background: #fdeaea;
}

/* ── Banner de mantenimiento (token caducado) ── */
.banner {
  margin: 8px 18px 0;
  padding: 9px 14px;
  border-radius: 10px;
  background: #fdf3e0;
  border: 1px solid #f3ddb0;
  color: #8a5a12;
  font-size: 13px;
}

/* ── Saludo personal ── */
.greet {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 18px 2px;
}
.greet-hi {
  font-size: 15px;
  font-weight: 600;
  color: #1e2330;
}
.greet-sub {
  font-size: 13px;
  color: #6b7480;
}
.greet-sub b {
  color: #1e2330;
}
.greet-sub b.greet-over {
  color: #e5484d;
}
.greet-scope {
  display: inline-flex;
  gap: 2px;
  background: #eceef3;
  border-radius: 9px;
  padding: 2px;
  margin-left: auto;
}
.gs-btn {
  border: 0;
  background: transparent;
  color: #6b7480;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  padding: 4px 12px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.gs-btn.active {
  background: #fff;
  color: #5145cd;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(20, 30, 50, 0.08);
}

/* ── Badge de vencidas en el tab Resumen ── */
.vbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 1px;
}

/* ── Urgencia en tarjetas ── */
.due.due-over {
  color: #e5484d;
  font-weight: 600;
}
.due.due-today {
  color: #c2701a;
  font-weight: 600;
}

/* ── Celebración al completar ── */
.check-circle.checked {
  background: #1f8f5f;
  border-color: #1f8f5f;
  color: #fff;
  animation: check-pop 0.35s ease;
}
.check-circle.checked svg {
  opacity: 1;
}
@keyframes check-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}
.confetti i {
  position: absolute;
  width: 7px;
  height: 10px;
  border-radius: 2px;
  opacity: 0;
  animation: conf-fly 0.9s ease-out forwards;
}
@keyframes conf-fly {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 90px)) rotate(var(--rot)) scale(0.6); }
}

/* ── Columna sin pendientes ── */
.col-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 13.5px;
  color: color-mix(in srgb, var(--col-fg, #6b7480) 55%, #9aa1ac);
  opacity: 0.85;
}

/* ── Semáforo de salud de tokens ── */
.health {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e3e6ea;
  background: #fff;
  cursor: pointer;
  position: relative;
  padding: 0;
}
.health::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c7ccd3;
}
.health.h-ok::after { background: #2aa570; }
.health.h-warn::after { background: #e0991a; animation: health-pulse 1.6s ease infinite; }
.health.h-bad::after { background: #e5484d; animation: health-pulse 1.2s ease infinite; }
@keyframes health-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.35); }
  50% { box-shadow: 0 0 0 5px rgba(229, 72, 77, 0); }
}

/* ── Vista Minutas ── */
.board.minutas-mode {
  display: block;
  overflow-x: visible;
  padding: 12px 18px 48px;
}
.mins {
  max-width: 980px;
  margin: 0 auto;
}
.mins-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.mins-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e2330;
}
.mins-sub {
  font-size: 13px;
  color: #8a93a0;
  margin-top: 2px;
}
.mins-new {
  flex: 0 0 auto;
  background: #5145cd;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.mins-new:hover {
  background: #443abc;
}
.mins-empty {
  color: #9aa1ac;
  font-size: 14px;
  padding: 36px 0;
  text-align: center;
}
.mins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
  align-items: start;
}
.min-card {
  background: #fff;
  border: 1px solid #edeff2;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}
.min-card:hover {
  box-shadow: 0 2px 10px rgba(20, 30, 50, 0.08);
}
.min-top {
  margin-bottom: 8px;
}
.min-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
}
.min-title {
  font-size: 15.5px;
  font-weight: 600;
  color: #1e2330;
  margin-bottom: 8px;
}
.min-p {
  font-size: 13.5px;
  color: #5a6472;
  margin: 4px 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.min-li {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 5px 0;
}
.min-li-dot {
  color: #aeb4bd;
  flex: 0 0 auto;
}
.min-li-t {
  flex: 1;
  font-size: 13.5px;
  color: #2b3340;
  word-break: break-word;
}
.min-conv {
  flex: 0 0 auto;
  border: 1px solid #e3e6ea;
  background: #f8f9fb;
  color: #5145cd;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  padding: 2px 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}
.min-card:hover .min-conv {
  opacity: 1;
}
.min-conv:hover {
  background: #eeeffc;
  border-color: #cfcaf3;
}
@media (hover: none) {
  .min-conv { opacity: 1; }
}

/* ── Pista de carreras (Resumen) ── */
.race {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.race-lane {
  display: flex;
  align-items: center;
  gap: 10px;
}
.race-name {
  flex: 0 0 88px;
  font-size: 13px;
  font-weight: 600;
  color: #2b3340;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.race-track {
  flex: 1;
  position: relative;
  height: 30px;
  background: #f1f3f6;
  border-radius: 8px;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0 18px,
    #e1e5ea 18px 30px
  );
  background-size: 100% 2px;
  background-position: 0 50%;
  background-repeat: no-repeat;
}
.race-car {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  font-size: 19px;
  line-height: 1;
  transition: left 0.6s ease;
  filter: drop-shadow(0 1px 1px rgba(20, 30, 50, 0.25));
}
.race-flag {
  flex: 0 0 auto;
  font-size: 15px;
}
.race-n {
  flex: 0 0 52px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e2330;
  text-align: right;
  white-space: nowrap;
}
.done-more {
  font-size: 12px;
  color: #aeb4bd;
  padding: 2px 6px;
}
.done-av {
  flex: 0 0 auto;
  margin-left: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c2c8d0;
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Pulido móvil ── */
@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 12px 4px;
  }
  .viewtoggle {
    order: 3;
    width: 100%;
  }
  .vbtn {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    white-space: nowrap;
  }
  .greet {
    padding: 6px 12px 2px;
  }
  .greet-scope {
    margin-left: 0;
  }
  .board {
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding: 8px 12px 40px;
  }
  .board.dash-mode,
  .board.minutas-mode,
  .board.tl-mode {
    scroll-snap-type: none;
  }
  .col {
    scroll-snap-align: center;
  }
  .check-circle {
    width: 24px;
    height: 24px;
  }
  .sub-check {
    width: 18px;
    height: 18px;
  }
  .race-name {
    flex-basis: 64px;
  }
}
