/* ─────────────────────────────────────────────
   Journal / Diário — modelo semanal tipo Trello
───────────────────────────────────────────── */

.journal-hero {
  border-bottom: 1px solid var(--border);
}

.journal-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: center;
}

.week-summary-card {
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, .16), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.25rem;
}

.summary-label {
  display: inline-block;
  margin-bottom: .4rem;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.week-summary-card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
}

.week-summary-card p {
  margin: .7rem 0 1rem;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
}

.week-summary-card a {
  font-size: .82rem;
  font-weight: 700;
  color: var(--blue);
}

/* Toolbar */

.journal-toolbar {
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.journal-search {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.journal-search:focus {
  border-color: rgba(59, 130, 246, .5);
}

.journal-search::placeholder {
  color: var(--muted);
}

.filter-pills {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .75rem;
}

.filter-pill {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}

.filter-pill:hover {
  color: var(--text);
}

.filter-pill.is-active {
  background: rgba(59, 130, 246, .15);
  border-color: rgba(59, 130, 246, .4);
  color: #60a5fa;
}

/* Board */

.journal-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 1rem;
}

.day-card {
  min-width: 260px;
  background: #080d05;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  padding: .8rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
}

.day-card.is-hidden {
  display: none;
}

.day-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .75rem;
}

.day-week {
  display: block;
  margin-bottom: .25rem;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-card h2 {
  margin: 0;
  font-size: .95rem;
  line-height: 1.3;
  color: var(--text);
}

.day-badge {
  flex-shrink: 0;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .25);
  color: #4ade80;
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.day-badge.muted {
  background: rgba(148, 163, 184, .1);
  border-color: rgba(148, 163, 184, .2);
  color: var(--muted);
}

.day-badge.close {
  background: rgba(251, 191, 36, .12);
  border-color: rgba(251, 191, 36, .25);
  color: #fbbf24;
}

/* Labels */

.day-labels {
  display: flex;
  gap: .28rem;
  margin-bottom: .75rem;
}

.label {
  width: 42px;
  height: 7px;
  border-radius: 999px;
}

.label-study {
  background: #3b82f6;
}

.label-podcast {
  background: #22d3ee;
}

.label-tv {
  background: #f97316;
}

.label-deploy {
  background: #22c55e;
}

.label-note {
  background: #a855f7;
}

.label-reminder {
  background: #facc15;
}

/* Items */

.day-items {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.day-item {
  background: #24262a;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  padding: .75rem;
}

.day-item p {
  margin: .45rem 0 0;
  color: var(--muted-strong);
  font-size: .84rem;
  line-height: 1.5;
}

.item-tag {
  display: inline-block;
  padding: .16rem .5rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tag-study {
  background: rgba(59, 130, 246, .14);
  color: #60a5fa;
}

.tag-podcast {
  background: rgba(34, 211, 238, .12);
  color: #22d3ee;
}

.tag-tv {
  background: rgba(249, 115, 22, .14);
  color: #fdba74;
}

.tag-deploy {
  background: rgba(34, 197, 94, .12);
  color: #4ade80;
}

.tag-note {
  background: rgba(168, 85, 247, .12);
  color: #c084fc;
}

.tag-reminder {
  background: rgba(250, 204, 21, .12);
  color: #fde047;
}

/* Footer */

.day-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .75rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(148, 163, 184, .12);
  color: var(--muted);
  font-size: .75rem;
}

.details-button {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: .75rem;
}

.details-button:hover {
  color: var(--text);
}

/* Empty */

.journal-empty {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
}

.journal-empty.is-visible {
  display: block;
}

/* Archive */

.archive-list {
  max-width: 900px;
  display: grid;
  gap: 1rem;
}

.archive-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.2rem;
}

.archive-card h2 {
  margin: 0 0 .45rem;
  font-size: 1rem;
}

.archive-card p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.6;
}

.archive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .9rem;
}

.archive-meta span {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Responsive */

@media (max-width: 980px) {
  .journal-hero-grid {
    grid-template-columns: 1fr;
  }

  .journal-board {
    grid-template-columns: repeat(7, 280px);
  }
}

@media (max-width: 640px) {
  .journal-board {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .day-card {
    min-width: 0;
  }
}
