body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(10, 102, 194, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-family);
}

.linkedin-app {
  min-height: 100vh;
}

.linkedin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.linkedin-header h1 {
  margin: 2px 0;
  font-size: 1.25rem;
}

.linkedin-header p,
.section-heading p {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.back-link {
  color: #0a66c2;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.access-status {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.access-status.ready {
  background: #dcfce7;
  color: #166534;
}

.linkedin-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-error {
  margin-bottom: 16px;
}

.daily-overview,
.history-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
}

.daily-overview {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
  padding: 26px;
}

.eyebrow {
  margin-bottom: 5px;
  color: #0a66c2;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-overview h2 {
  margin-bottom: 8px;
  font-size: 1.55rem;
}

.overview-copy {
  max-width: 620px;
  color: var(--text-muted);
  line-height: 1.55;
}

.goal-panel {
  padding: 17px;
  border-radius: 13px;
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
}

.goal-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.goal-value strong {
  color: #075985;
  font-size: 2rem;
}

.goal-value span {
  color: var(--text-muted);
  font-weight: 600;
}

.goal-progress {
  height: 9px;
  margin: 10px 0;
  overflow: hidden;
  border-radius: 999px;
  background: white;
}

#goal-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0a66c2, #22c55e);
  transition: width 250ms ease;
}

#goal-message,
.reset-label {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.reset-label {
  margin-top: 5px;
}

.success-banner {
  margin-top: 16px;
  padding: 14px 17px;
  border: 1px solid #86efac;
  border-radius: 11px;
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.tier-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 12px;
}

.tier-intro div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tier-intro span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tier-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tier-section {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.tier-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.tier-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tier-heading h2 {
  font-size: 1rem;
}

.tier-heading p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.tier-badge {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: white;
  font-weight: 800;
}

.tier-a .tier-badge { background: #7c3aed; }
.tier-b .tier-badge { background: #0a66c2; }
.tier-c .tier-badge { background: #64748b; }

.tier-count {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.candidate-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
}

.candidate-card.completed {
  border-color: #86efac;
  background: #f0fdf4;
}

.candidate-card h3 {
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-role {
  min-height: 36px;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.candidate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 10px 0;
}

.candidate-tags span {
  padding: 3px 7px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.65rem;
}

.candidate-notes {
  flex: 1;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.last-commented {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 0.67rem;
}

.candidate-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.linkedin-open {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  background: #0a66c2;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.linkedin-open:hover {
  background: #084f96;
}

.comment-toggle {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #86efac;
  border-radius: 9px;
  background: #dcfce7;
  color: #166534;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
}

.candidate-card.completed .comment-toggle {
  border-color: var(--border);
  background: white;
  color: var(--text-muted);
}

.comment-toggle:disabled {
  cursor: wait;
  opacity: 0.6;
}

.history-panel {
  margin-top: 22px;
  padding: 22px;
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 3px;
  font-size: 1rem;
}

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

.history-item {
  display: grid;
  grid-template-columns: 130px 100px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--bg-elevated);
}

.history-date {
  font-size: 0.8rem;
  font-weight: 700;
}

.history-total {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.history-people {
  color: var(--text-muted);
  font-size: 0.73rem;
  text-align: right;
}

.loading-state,
.empty-state {
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 1050px) {
  .candidate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .linkedin-header {
    padding: 15px 18px;
  }

  .linkedin-main {
    width: min(100% - 24px, 1180px);
    padding-top: 14px;
  }

  .daily-overview {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 19px;
  }

  .candidate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .history-item {
    grid-template-columns: 1fr auto;
  }

  .history-people {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 500px) {
  .access-status {
    display: none;
  }

  .candidate-grid {
    grid-template-columns: 1fr;
  }

  .tier-section {
    padding: 15px;
  }
}
