/* Hive Task Dashboard Widget v1 */

.htd-panel {
  position: fixed;
  right: 0;
  top: 0;
  width: 380px;
  height: 100vh;
  background: #111827;
  border-left: 1px solid rgba(255,255,255,0.1);
  overflow-y: auto;
  z-index: 9999;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: rgba(255,255,255,0.8);
  transition: transform 0.3s ease;
}
.htd-panel-hidden { transform: translateX(100%); }
.htd-panel-visible { transform: translateX(0); }

.htd-toggle-btn {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 9998;
  background: rgba(249,115,22,0.9);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.htd-toggle-btn:hover { background: rgba(249,115,22,1); }

.htd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.htd-title {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  color: rgba(255,255,255,0.9);
}
.htd-refresh {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 16px;
}
.htd-refresh:hover { color: white; border-color: rgba(255,255,255,0.4); }

/* Stats bar */
.htd-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.htd-stat {
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.htd-stat-green { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); }
.htd-stat-blue { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.2); }
.htd-stat-orange { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); }
.htd-stat-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
}
.htd-stat-green .htd-stat-num { color: #34d399; }
.htd-stat-blue .htd-stat-num { color: #60a5fa; }
.htd-stat-orange .htd-stat-num { color: #fbbf24; }
.htd-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.4);
}

/* Project card */
.htd-project {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 8px;
  overflow: hidden;
}
.htd-project:hover { border-color: rgba(249,115,22,0.3); }
.htd-project-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
}
.htd-project-header:hover { background: rgba(255,255,255,0.03); }
.htd-chevron { font-size: 10px; color: rgba(255,255,255,0.3); width: 12px; }
.htd-project-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.htd-counts {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* Progress bar */
.htd-progress {
  height: 3px;
  background: rgba(255,255,255,0.05);
}
.htd-progress-fill {
  height: 100%;
  background: #10b981;
  transition: width 0.5s;
}

/* Tabs */
.htd-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px 4px;
}
.htd-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.htd-tab:hover { color: rgba(255,255,255,0.6); }
.htd-tab-active {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
}

/* Task row */
.htd-tasks {
  padding: 4px 12px 8px;
  max-height: 240px;
  overflow-y: auto;
}
.htd-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
}
.htd-task:hover { background: rgba(255,255,255,0.03); }
.htd-status {
  font-size: 10px;
  font-weight: 500;
  width: 70px;
  flex-shrink: 0;
  text-transform: capitalize;
}
.htd-title {
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.htd-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 8px;
  white-space: nowrap;
}

.htd-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.35);
  padding: 8px 0 4px;
}

.htd-empty {
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 12px;
  padding: 16px 0;
}

.htd-loading {
  text-align: center;
  color: rgba(255,255,255,0.4);
  padding: 32px 0;
  font-size: 13px;
}
