/* ================================================================
   LYKOS SISTEMA — ACTIVITIES STYLES
================================================================ */

/* ── Priority colors ────────────────────────────────────────── */
:root {
  --prio-alta:  #ef4444;
  --prio-media: #f59e0b;
  --prio-baixa: #22c55e;
}

/* ── Deadline Warnings ──────────────────────────────────────── */
#activity-warnings {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.deadline-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 500;
}

.deadline-warning.overdue {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
}

.deadline-warning.today {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
  color: #fbbf24;
}

.deadline-warning.soon {
  background: rgba(107,63,160,0.15);
  border: 1px solid var(--purple-400);
  color: var(--purple-100);
}

/* ── Activities Kanban ──────────────────────────────────────── */
.act-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: flex-start;
}

.act-col {
  background: var(--purple-700);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

.act-col-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--purple-500);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.act-col-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.act-col-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.act-col-count {
  background: var(--purple-500);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
}

.act-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Activity Card ──────────────────────────────────────────── */
.act-card {
  background: var(--purple-600);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-md);
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t);
  position: relative;
  border-left: 3px solid transparent;
}

.act-card:hover {
  border-color: var(--purple-300);
  transform: translateY(-1px);
}

.act-card.prio-alta   { border-left-color: var(--prio-alta); }
.act-card.prio-media  { border-left-color: var(--prio-media); }
.act-card.prio-baixa  { border-left-color: var(--prio-baixa); }

.act-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.act-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  flex: 1;
}

.act-card-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity var(--t), color var(--t);
  flex-shrink: 0;
}
.act-card:hover .act-card-del { opacity: 1; }
.act-card-del:hover { color: var(--red); }

.act-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* Priority badge */
.prio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prio-badge.alta  { background: rgba(239,68,68,0.15);  color: var(--prio-alta); }
.prio-badge.media { background: rgba(245,158,11,0.15); color: var(--prio-media); }
.prio-badge.baixa { background: rgba(34,197,94,0.12);  color: var(--prio-baixa); }

/* Type badge */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--purple-500);
  color: var(--text-secondary);
}

.type-badge.cliente       { background: rgba(255,102,32,0.12); color: var(--orange-300); }
.type-badge.desenvolvimento { background: rgba(59,130,246,0.12); color: #93c5fd; }

/* Deadline on card */
.act-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.act-deadline-badge.overdue { color: var(--red); font-weight: 600; }
.act-deadline-badge.today   { color: var(--yellow); font-weight: 600; }

/* Client link badge */
.act-client-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Comment count */
.act-comment-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ── Activity Detail Modal ──────────────────────────────────── */
.act-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.act-detail-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  background: var(--purple-700);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.act-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.act-detail-row strong { color: var(--text-secondary); }

.act-created-info {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 12px;
  font-style: italic;
}

.act-checklist-section {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--purple-500);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(94, 53, 177, 0.16), rgba(43, 26, 78, 0.22));
}

.act-checklist-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.act-checklist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.act-checklist-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--purple-500);
  background: rgba(17, 7, 31, 0.42);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  transition: transform var(--t), border-color var(--t), background var(--t);
}

.act-checklist-item:hover {
  transform: translateY(-1px);
  border-color: rgba(74, 222, 128, 0.38);
}

.act-checklist-item.done {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(16, 185, 129, 0.12);
}

.act-checklist-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  color: #08140d;
  background: rgba(255, 255, 255, 0.06);
}

.act-checklist-item.done .act-checklist-box {
  border-color: rgba(74, 222, 128, 0.55);
  background: #4ade80;
}

.act-checklist-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.act-checklist-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.act-checklist-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ── Comments ────────────────────────────────────────────────── */
.act-comments-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--purple-500);
}

.act-comments-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.act-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  max-height: 240px;
  overflow-y: auto;
}

.act-comment-item {
  background: var(--purple-700);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.act-comment-body { flex: 1; }

.act-comment-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.act-comment-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.act-comment-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 14px;
  transition: color var(--t);
  padding: 0;
}
.act-comment-del:hover { color: var(--red); }

.act-add-comment {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.act-add-comment .form-textarea {
  flex: 1;
  min-height: 60px;
}

/* ── Done card ──────────────────────────────────────────────── */
.act-card.act-done {
  opacity: 0.65;
}

.act-card.act-done .act-card-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.act-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #4ade80;
  font-weight: 600;
}

/* ── Priority View ──────────────────────────────────────────── */
#activities-priority-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.act-prio-group {
  background: var(--purple-700);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.act-prio-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--purple-500);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.act-prio-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  padding: 12px;
}

/* ── File Upload ────────────────────────────────────────────── */
.act-file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px dashed var(--purple-400);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
  margin-bottom: 8px;
}

.act-file-upload-btn:hover {
  border-color: var(--orange-500);
  color: var(--orange-500);
}

.act-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.act-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--purple-700);
  border: 1px solid var(--purple-500);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 12px;
}

.act-file-download {
  flex: 1;
  color: var(--purple-100);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act-file-download:hover { color: var(--orange-400); text-decoration: underline; }

.act-file-size {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.act-file-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--t);
}
.act-file-del:hover { color: var(--red); }

/* ── Files section in detail modal ─────────────────────────── */
.act-files-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--purple-500);
}

/* ── History section ────────────────────────────────────────── */
.act-history-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--purple-500);
}

.act-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 16px;
}

.act-history-list::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--purple-500);
}

.act-history-item {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}

.act-history-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--purple-400);
  border: 2px solid var(--purple-600);
  flex-shrink: 0;
  margin-top: 3px;
  position: absolute;
  left: -20px;
}

.act-history-body { flex: 1; }

.act-history-field {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.act-history-change {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  flex-wrap: wrap;
}

.act-history-from {
  color: var(--text-muted);
  text-decoration: line-through;
}

.act-history-to {
  color: var(--text-primary);
  font-weight: 600;
}

.act-history-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.act-history-item-extra {
  display: none;
}

.act-history-section:not(.is-collapsed) .act-history-item-extra {
  display: flex;
}

.act-history-toggle {
  margin-top: 12px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .act-kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .act-kanban { grid-template-columns: 1fr; }
  .act-prio-group-cards { grid-template-columns: 1fr; }
}
