/* ════════════════════════════════════════════════════════════
   VIEWS.CSS — Calendar, Contacts, Analytics, Goals
   ════════════════════════════════════════════════════════════ */

/* ── SHARED LAYOUT ──────────────────────────────────────────── */
#view-calendar,
#view-contacts,
#view-analytics,
#view-goals {
  display: none;
  flex-direction: column;
  gap: 16px;
}

#view-calendar.active,
#view-contacts.active,
#view-analytics.active,
#view-goals.active {
  display: flex;
}

/* ════════════════════════════════════════════════════════════
   CALENDAR VIEW
   ════════════════════════════════════════════════════════════ */

.cal-view-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cal-view-tabs {
  display: flex;
  gap: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.cal-tab {
  padding: 5px 16px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.cal-tab.active {
  background: var(--accent);
  color: #000;
}

.cal-view-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-view-period-label {
  font-size: 15px;
  font-weight: 700;
  min-width: 150px;
  text-align: center;
}

.cal-nav-btn {
  padding: 5px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: border-color .15s;
}

.cal-nav-btn:hover {
  border-color: var(--accent);
}

.cal-today-btn {
  padding: 5px 12px;
  font-size: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.cal-today-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.cal-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.cal-legend-job {
  background: var(--accent);
}

.cal-legend-deadline {
  background: var(--red);
}

.cal-legend-contact {
  background: var(--yellow);
}

.cal-legend-event {
  background: #a78bfa;
}

/* Event type filter pills */
.cal-event-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-event-filter {
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.cal-event-filter.active,
.cal-event-filter:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Full calendar body */
#cal-view-body {
  min-height: 200px;
}

/* Month grid */
.cal-full-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-full-dow {
  padding: 8px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  background: var(--card);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Weekend day-of-week headers (Sun = first, Sat = last) */
.cal-full-dow:first-child,
.cal-full-dow:nth-child(7) {
  color: rgba(255, 100, 130, 0.65);
}

.cal-full-cell {
  background: var(--surface);
  min-height: 110px;
  padding: 8px 6px 6px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  overflow: hidden;
}

.cal-full-cell:hover {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cal-full-cell.cal-weekend {
  background: rgba(255, 255, 255, 0.018);
}

.cal-full-cell.cal-today {
  background: rgba(0, 212, 170, .05);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cal-full-cell.cal-other-month .cal-cell-day-num {
  color: var(--border);
}

.cal-cell-day-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
}

/* Day number badge wrapper */
.cal-day-num-inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.cal-today .cal-day-num-inner {
  background: var(--accent);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

.cal-full-event {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 3px solid currentColor;
  transition: filter .1s;
}

.cal-full-event:hover {
  filter: brightness(1.15);
}

/* Color dot inside each event chip */
.cal-ev-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.8;
}

.cal-full-event.ev-job {
  background: rgba(0, 212, 170, .12);
  color: var(--accent);
}

.cal-full-event.ev-deadline {
  background: rgba(255, 77, 109, .12);
  color: var(--red);
}

.cal-full-event.ev-contact {
  background: rgba(210, 153, 34, .12);
  color: var(--yellow);
}

.cal-full-event.ev-event {
  background: rgba(167, 139, 250, .12);
  color: #a78bfa;
}

/* Event format badge */
.cal-event-format-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  text-transform: capitalize;
}

.cal-event-format-in-person {
  background: rgba(63, 185, 80, .15);
  color: var(--green);
}

.cal-event-format-hybrid {
  background: rgba(0, 212, 170, .15);
  color: var(--accent);
}

.cal-event-format-online {
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
}

/* Join link button on upcoming strip / day modal */
.cal-event-join-btn {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s;
}

.cal-event-join-btn:hover {
  background: rgba(167, 139, 250, .3);
}

/* Event modal format radio group */
.event-format-group {
  display: flex;
  gap: 20px;
  padding: 6px 0;
}

.event-format-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.cal-more-events {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 7px;
  margin-top: 3px;
  letter-spacing: .02em;
}

/* Week strip */
.cal-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.cal-week-day-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  min-height: 140px;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}

.cal-week-day-cell:hover {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--border);
}

.cal-week-day-cell.cal-weekend {
  background: rgba(255, 255, 255, 0.018);
}

.cal-week-day-cell.cal-today {
  border-color: var(--accent);
  background: rgba(0, 212, 170, .05);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.cal-week-dow {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.cal-week-day-cell.cal-weekend .cal-week-dow {
  color: rgba(255, 100, 130, 0.6);
}

.cal-week-date {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Circle badge on week view today */
.cal-week-date .cal-day-num-inner {
  width: 32px;
  height: 32px;
  font-size: 18px;
}

.cal-today .cal-week-date .cal-day-num-inner {
  background: var(--accent);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.2);
}

/* Year grid */
.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cal-year-month {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}

.cal-year-month:hover {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.cal-year-month-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Event count badge per month in year view */
.cal-year-event-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 99px;
  padding: 1px 7px;
  letter-spacing: 0;
}

.cal-year-event-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cal-year-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: transform .1s;
}

.cal-year-dot:hover {
  transform: scale(1.5);
}

/* Upcoming strip */
.cal-upcoming-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.cal-upcoming-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.cal-upcoming-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
  margin-bottom: 4px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.cal-upcoming-item:hover {
  background: var(--card);
}

.cal-upcoming-item:hover .cal-upcoming-label {
  color: var(--accent);
}

/* Color the left border by event type */
.cal-upcoming-item[data-ev-type="job"] {
  border-left-color: var(--accent);
}

.cal-upcoming-item[data-ev-type="deadline"] {
  border-left-color: var(--red);
}

.cal-upcoming-item[data-ev-type="contact"] {
  border-left-color: var(--yellow);
}

.cal-upcoming-item[data-ev-type="event"] {
  border-left-color: #a78bfa;
}

.cal-upcoming-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-upcoming-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  width: 52px;
  flex-shrink: 0;
}

.cal-upcoming-label {
  font-size: 13px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .15s;
}

.cal-upcoming-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--card);
  color: var(--text-muted);
  flex-shrink: 0;
}


/* Job Activity section (inside Calendar view) */
.cal-activity-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.cal-activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Activity counts row */
.act-counts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.act-count-card {
  flex: 1;
  min-width: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.act-count-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* Bottom accent bar */
.act-count-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--accent), rgba(0, 212, 170, 0.3));
  opacity: 0.5;
}

.act-count-value {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent) 0%, rgba(0, 212, 170, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.act-count-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 6px;
}

.act-stage-breakdown {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.act-stage-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.act-stage-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.act-stage-row:last-child {
  border-bottom: none;
}

.act-stage-emoji {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.act-stage-label {
  flex: 1;
  color: var(--text);
}

.act-stage-count {
  font-weight: 700;
  color: var(--accent);
  min-width: 24px;
  text-align: right;
}

/* ════════════════════════════════════════════════════════════
   CONTACTS / NETWORK VIEW
   ════════════════════════════════════════════════════════════ */

.contacts-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contacts-search-wrap {
  flex: 1;
  min-width: 200px;
}

.contacts-type-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.contact-filter-btn {
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.contact-filter-btn.active,
.contact-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.contacts-sort select {
  font-size: 12px;
}

/* Stat strip */
.contacts-stat-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contact-stat-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  min-width: 100px;
}

.contact-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}

.contact-stat-value {
  font-size: 24px;
  font-weight: 700;
}

/* Cards grid */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s, transform .15s;
}

.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.contact-name {
  font-size: 16px;
  font-weight: 700;
}

.contact-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.contact-type-badge.type-recruiter {
  background: rgba(0, 212, 170, .15);
  color: var(--accent);
}

.contact-type-badge.type-hm {
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
}

.contact-type-badge.type-referral {
  background: rgba(63, 185, 80, .15);
  color: var(--green);
}

.contact-type-badge.type-other {
  background: var(--border);
  color: var(--text-muted);
}

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.contact-meta-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.contact-dates {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.contact-date-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-date-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10px;
}

.contact-date-value {
  color: var(--text);
  font-weight: 500;
}

.contact-date-value.overdue {
  color: var(--red);
}

.contact-linked-job {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-linked-job:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact-card-footer {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}


/* ════════════════════════════════════════════════════════════
   ANALYTICS VIEW
   ════════════════════════════════════════════════════════════ */

@keyframes an-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* KPI card staggered entrance */
.an-kpi-card.an-kpi-enter {
  opacity: 0;
  animation: an-fade-up .35s ease forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

/* Section card staggered entrance */
.dash-card.an-card-enter {
  opacity: 0;
  animation: an-fade-up .4s ease forwards;
  animation-delay: calc(var(--ci, 0) * 45ms);
}

.analytics-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.an-period-tabs {
  display: flex;
  gap: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.an-tab {
  padding: 5px 14px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.an-tab.active {
  background: var(--accent);
  color: #000;
}

/* KPI strip */
.an-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.an-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform .18s, box-shadow .18s;
}

.an-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
}

.an-kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.an-kpi-value {
  font-size: 26px;
  font-weight: 700;
}

/* Row layouts */
.an-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.an-row-three {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .an-row-two {
    grid-template-columns: 1fr;
  }

  .an-row-three {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .an-row-three {
    grid-template-columns: 1fr;
  }
}

/* Generic bar chart rows */
.an-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.an-bar-label {
  width: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  transition: color .15s;
}

.an-bar-track {
  flex: 1;
  height: 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.an-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(0, 212, 170, 0.4) 100%);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
  position: relative;
  min-width: 0;
}

/* Soft gloss on top half */
.an-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.2) 0%,
      rgba(255, 255, 255, 0.04) 55%,
      transparent 100%);
  pointer-events: none;
}

.an-bar-fill.fill-green {
  background: linear-gradient(90deg, var(--green) 0%, rgba(63, 185, 80, 0.4) 100%);
}

.an-bar-fill.fill-yellow {
  background: linear-gradient(90deg, var(--yellow) 0%, rgba(210, 153, 34, 0.4) 100%);
}

.an-bar-fill.fill-red {
  background: linear-gradient(90deg, var(--red) 0%, rgba(255, 77, 109, 0.4) 100%);
}

.an-bar-fill.fill-purple {
  background: linear-gradient(90deg, #a78bfa 0%, rgba(167, 139, 250, 0.4) 100%);
}

.an-bar-fill.fill-orange {
  background: linear-gradient(90deg, #f97316 0%, rgba(249, 115, 22, 0.4) 100%);
}

.an-bar-count {
  font-size: 12px;
  font-weight: 700;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
  color: var(--text);
}

.an-bar-row-clickable {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 3px 4px;
  margin-left: -4px;
  transition: background .15s;
}

.an-bar-row-clickable:hover {
  background: var(--hover);
}

.an-bar-row-clickable:hover .an-bar-label {
  color: var(--text);
}

.an-filter-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Funnel bars */
.an-funnel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.an-funnel-row-click {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 3px 4px;
  margin-left: -4px;
  transition: background .15s;
}

.an-funnel-row-click:hover {
  background: var(--hover);
}

.an-funnel-row-click:hover .an-funnel-label {
  color: var(--text);
}

.an-funnel-label {
  width: 90px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.an-funnel-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.an-funnel-bar {
  height: 28px;
  border-radius: 99px;
  min-width: 6px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.75);
  background: linear-gradient(90deg, var(--accent) 0%, rgba(0, 212, 170, 0.5) 100%);
  position: relative;
  overflow: hidden;
}

.an-funnel-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2) 0%, transparent 55%);
  pointer-events: none;
}

.an-funnel-bar.fill-purple {
  background: linear-gradient(90deg, #a78bfa 0%, rgba(167, 139, 250, 0.5) 100%);
}

.an-funnel-bar.fill-yellow {
  background: linear-gradient(90deg, var(--yellow) 0%, rgba(210, 153, 34, 0.5) 100%);
}

.an-funnel-bar.fill-green {
  background: linear-gradient(90deg, var(--green) 0%, rgba(63, 185, 80, 0.5) 100%);
}

.an-conv-rate {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Over-time vertical bar chart */
.an-timechart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 200px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.an-timechart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 40px;
}

.an-timechart-bar {
  width: 100%;
  max-width: 48px;
  background: linear-gradient(to top, var(--accent) 0%, rgba(0, 212, 170, 0.45) 100%);
  border-radius: 5px 5px 2px 2px;
  min-height: 3px;
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

/* Side gloss on vertical bars */
.an-timechart-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.18) 0%, transparent 45%);
  pointer-events: none;
}

.an-col-click {
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background .15s;
  padding: 2px 2px 0;
}

.an-col-click:hover {
  background: var(--hover);
}

.an-col-click:hover .an-timechart-bar {
  filter: brightness(1.2);
}

.an-timechart-label {
  font-size: 9px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.an-timechart-count {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Over-time time buttons */
.an-time-btns {
  display: flex;
  gap: 3px;
}

.an-time-btn {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.an-time-btn.active,
.an-time-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.dash-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* ════════════════════════════════════════════════════════════
   GOALS VIEW
   ════════════════════════════════════════════════════════════ */

.goals-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.goals-period-tabs {
  display: flex;
  gap: 3px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.goal-period-tab {
  padding: 5px 14px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.goal-period-tab.active {
  background: var(--accent);
  color: #000;
}

.goals-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Summary strip */
.goals-summary-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.goals-summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 180px;
}

.goals-mini-ring {
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.goals-mini-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.goals-mini-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .5s ease;
}

.goals-mini-ring-fill.ring-done {
  stroke: var(--green);
}

.goals-mini-ring-fill.ring-behind {
  stroke: var(--red);
}

.goals-summary-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.goals-summary-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.goals-summary-pct {
  font-size: 20px;
  font-weight: 700;
}

.goals-summary-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* Goal cards */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.goal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s;
}

.goal-card.goal-complete {
  border-color: var(--green);
}

.goal-card.goal-behind {
  border-color: var(--red);
}

.goal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.goal-title {
  font-size: 16px;
  font-weight: 700;
}

.goal-period-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}

.goal-period-badge.badge-week {
  background: rgba(0, 212, 170, .15);
  color: var(--accent);
}

.goal-period-badge.badge-month {
  background: rgba(167, 139, 250, .15);
  color: #a78bfa;
}

.goal-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal-progress-counts {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.goal-current {
  font-size: 32px;
  font-weight: 700;
}

.goal-separator {
  font-size: 18px;
  color: var(--text-muted);
}

.goal-target {
  font-size: 18px;
  color: var(--text-muted);
}

.goal-track {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.goal-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .5s;
  max-width: 100%;
  width: 0;
}

.goal-fill.fill-done {
  background: var(--green);
}

.goal-fill.fill-behind {
  background: var(--red);
}

.goal-status-label {
  font-size: 12px;
  font-weight: 600;
}

.goal-status-done {
  color: var(--green);
}

.goal-status-on-track {
  color: var(--accent);
}

.goal-status-behind {
  color: var(--red);
}

.goal-status-not-started {
  color: var(--text-muted);
}

.goal-card-footer {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Empty state + presets */
.goals-empty {
  margin-top: 8px;
}

.goals-preset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.goals-preset-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.goals-preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   SHARED VIEW HERO BANNER
   ════════════════════════════════════════════════════════════ */

.view-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--vh-accent, var(--accent));
  border-radius: var(--radius);
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06) 0%, transparent 55%);
  margin-bottom: 0;
}

/* Per-view accent colours */
.view-hero--dashboard {
  --vh-accent: var(--accent);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06) 0%, transparent 55%);
}

.view-hero--board {
  --vh-accent: #a78bfa;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.06) 0%, transparent 55%);
}

.view-hero--learning {
  --vh-accent: var(--green);
  background: linear-gradient(135deg, rgba(63, 185, 80, 0.06) 0%, transparent 55%);
}

.view-hero--calendar {
  --vh-accent: var(--yellow);
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.06) 0%, transparent 55%);
}

.view-hero--contacts {
  --vh-accent: #60a5fa;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.06) 0%, transparent 55%);
}

.view-hero--goals {
  --vh-accent: #fb923c;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.06) 0%, transparent 55%);
}

.view-hero--analytics {
  --vh-accent: var(--accent);
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.06) 0%, transparent 55%);
}

.view-hero-icon {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--vh-accent, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vh-accent, var(--accent));
  flex-shrink: 0;
  box-shadow: 0 0 18px rgba(0, 212, 170, 0.1);
}

.view-hero--board .view-hero-icon {
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.12);
}

.view-hero--learning .view-hero-icon {
  box-shadow: 0 0 18px rgba(63, 185, 80, 0.12);
}

.view-hero--calendar .view-hero-icon {
  box-shadow: 0 0 18px rgba(210, 153, 34, 0.12);
}

.view-hero--contacts .view-hero-icon {
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.12);
}

.view-hero--goals .view-hero-icon {
  box-shadow: 0 0 18px rgba(251, 146, 60, 0.12);
}

.view-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.view-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 560px;
}

/* Stack icon above text on medium screens for content-heavy heroes */
@media (max-width: 960px) {

  .view-hero--dashboard,
  .view-hero--board,
  .view-hero--learning {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 22px;
  }
}

/* All heroes stack on small screens */
@media (max-width: 600px) {
  .view-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
  }
}