/* ============================================
   MAADANE LEV - Tracker Pages
   CR | Suivi des Temps | Livrables
   Consistent with Design System (styles.css)
   ============================================ */

/* ============================================
   1. FILTERS BAR
   ============================================ */
.filters-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
  min-width: 140px;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border-card);
  border-radius: 20px;
  background: white;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}

.filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Legacy filter-bar (backward compat) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.filter-bar label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.filter-bar select {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  background: white;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s;
  min-width: 140px;
}

.filter-bar select:focus {
  border-color: var(--primary);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ============================================
   2. CR (COMPTES RENDUS) PAGE
   ============================================ */
.cr-entry {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.3s;
}

.cr-entry:hover {
  box-shadow: var(--shadow);
}

.cr-entry-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.cr-entry-date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.cr-entry-participants {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cr-date {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 0.6rem;
}

.cr-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* CR Section (accordion variant) */
.cr-section {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.cr-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
}

.cr-section-header:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cr-section-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--primary);
  background: var(--primary-dim);
}

.cr-section-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cr-section-letter {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.cr-section-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.cr-section-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cr-section-header .chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.cr-section-header.open .chevron {
  transform: rotate(180deg);
}

.cr-section-body {
  display: none;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-top: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cr-section-body.open {
  display: block;
}

/* CR Badges */
.cr-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
}

.cr-badge-acte {
  background: var(--green-bg);
  color: #065F46;
  border: 1px solid var(--green-border);
}

.cr-badge-en-cours {
  background: var(--orange-bg);
  color: #92400E;
  border: 1px solid var(--orange-border);
}

.cr-badge-a-trancher {
  background: var(--blue-bg);
  color: #1E40AF;
  border: 1px solid var(--blue-border);
}

/* CR Tags */
.cr-tag-dit {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: var(--primary);
  color: white;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.cr-tag-suggere {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

/* CR Table (reuses .info-table patterns) */
.cr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.cr-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--primary);
  background: var(--primary-dim);
}

.cr-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: top;
}

.cr-table tr:hover td {
  background: rgba(79, 56, 224, 0.03);
}

.cr-table tr:last-child td {
  border-bottom: none;
}

/* ============================================
   3. OSSATURE TREE (Section D)
   ============================================ */
.cr-tree {
  font-size: 0.85rem;
  line-height: 1.8;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  white-space: pre;
  color: var(--text-secondary);
}

/* ============================================
   4. CR QUESTIONS LIST
   ============================================ */
.cr-questions {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: cr-question;
}

.cr-questions li {
  counter-increment: cr-question;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cr-questions li:last-child {
  border-bottom: none;
}

.cr-questions li::before {
  content: counter(cr-question) ".";
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.5rem;
}

/* ============================================
   5. TIMER / TIME TRACKING PAGE
   ============================================ */
.timer-display {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 2px;
  color: var(--text-dark);
  padding: 2rem 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.4s, box-shadow 0.4s, color 0.4s;
  margin-bottom: 1.25rem;
}

.timer-display.running {
  color: var(--green);
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  animation: timer-pulse 2s ease-in-out infinite;
}

@keyframes timer-pulse {
  0%, 100% {
    border-color: var(--green);
    box-shadow: var(--shadow-md);
  }
  50% {
    border-color: var(--green-border);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.15), 0 2px 4px rgba(16, 185, 129, 0.1);
  }
}

.timer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* New naming convention */
.timer-btn-start,
.timer-btn-stop {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.timer-btn-start {
  background: var(--green);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.timer-btn-start:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.timer-btn-stop {
  background: var(--red);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.timer-btn-stop:hover {
  background: #DC2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* Legacy btn-timer naming (backward compat) */
.btn-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.btn-timer-start {
  background: var(--green);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-timer-start:hover {
  background: #0EA472;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-timer-stop {
  background: var(--red);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-timer-stop:hover {
  background: #DC2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* Timer form */
.timer-form {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.timer-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timer-form input,
.timer-form select,
.timer-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  background: white;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-bottom: 1rem;
}

.timer-form input:focus,
.timer-form select:focus,
.timer-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.timer-save-form {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* Time entry rows */
.time-entry-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.time-entry-row:hover {
  border-color: var(--border-card);
  box-shadow: var(--shadow-sm);
}

/* Time Category Badges -- new naming */
.time-category-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.cat-reunion {
  background: var(--blue-bg);
  color: #1E40AF;
  border: 1px solid var(--blue-border);
}

.cat-production {
  background: var(--green-bg);
  color: #065F46;
  border: 1px solid var(--green-border);
}

.cat-strategie {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(79, 56, 224, 0.25);
}

.cat-admin {
  background: var(--orange-bg);
  color: #92400E;
  border: 1px solid var(--orange-border);
}

.cat-autre {
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

/* Legacy cat-badge naming (backward compat) */
.cat-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.cat-badge-reunion {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-border);
}

.cat-badge-production {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.cat-badge-strategie {
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid rgba(79, 56, 224, 0.2);
}

.cat-badge-admin {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-border);
}

.cat-badge-autre {
  background: #F3F4F6;
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

/* Time Summary -- new naming */
.time-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.time-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.time-summary-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.time-summary-card .summary-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.time-summary-card .summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Legacy summary-grid naming (backward compat) */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.summary-card {
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  border-left: 3px solid var(--border-card);
  transition: box-shadow 0.3s;
}

.summary-card:hover {
  box-shadow: var(--shadow-sm);
}

.summary-cat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.35rem;
}

.summary-cat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
}

/* Summary card category colors */
.summary-card.cat-reunion { border-left-color: var(--blue); }
.summary-card.cat-reunion .summary-cat-label { color: var(--blue); }

.summary-card.cat-production { border-left-color: var(--green); }
.summary-card.cat-production .summary-cat-label { color: var(--green); }

.summary-card.cat-strategie { border-left-color: var(--primary); }
.summary-card.cat-strategie .summary-cat-label { color: var(--primary); }

.summary-card.cat-admin { border-left-color: var(--orange); }
.summary-card.cat-admin .summary-cat-label { color: var(--orange); }

.summary-card.cat-autre { border-left-color: var(--text-muted); }
.summary-card.cat-autre .summary-cat-label { color: var(--text-muted); }

/* Summary total */
.summary-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  background: var(--primary-dim);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
}

.summary-total-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.summary-total-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

/* ============================================
   6. FORM ELEMENTS (shared)
   ============================================ */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 60px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.duration-inputs {
  display: flex;
  gap: 0.75rem;
}

.duration-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.duration-field .form-control {
  width: 70px;
  text-align: center;
}

.duration-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   7. LIVRABLES PAGE
   ============================================ */
.livrable-phase-group {
  margin-bottom: 1.5rem;
}

.livrable-phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s;
  user-select: none;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.livrable-phase-header:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.livrable-phase-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--primary);
  background: var(--primary-dim);
}

.livrable-phase-header .chevron {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.livrable-phase-header.open .chevron {
  transform: rotate(180deg);
}

.livrable-phase-body {
  display: none;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-top: none;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

.livrable-phase-body.open {
  display: block;
}

.livrable-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  border-left: 3px solid var(--primary);
  transition: box-shadow 0.3s;
}

.livrable-card:hover {
  box-shadow: var(--shadow-sm);
}

.livrable-card:last-child {
  margin-bottom: 0;
}

/* Livrable Status Badges */
.livrable-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
}

.status-a-faire {
  background: var(--bg-page);
  color: var(--text-muted);
  border: 1px solid var(--border-card);
}

.status-brouillon {
  background: var(--orange-bg);
  color: #92400E;
  border: 1px solid var(--orange-border);
}

.status-en-review {
  background: var(--blue-bg);
  color: #1E40AF;
  border: 1px solid var(--blue-border);
}

.status-valide {
  background: var(--green-bg);
  color: #065F46;
  border: 1px solid var(--green-border);
}

/* Livrable Who (reuses .badge pattern) */
.livrable-who {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  vertical-align: middle;
}

.livrable-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.5rem;
}

.livrable-files,
.livrable-links {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.livrable-files a,
.livrable-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--primary);
  margin-right: 1rem;
  margin-bottom: 0.35rem;
  transition: color 0.3s;
}

.livrable-files a:hover,
.livrable-links a:hover {
  color: var(--primary-light);
}

.livrable-upload-zone {
  margin-top: 0.75rem;
  padding: 1.5rem;
  border: 2px dashed var(--border-card);
  border-radius: var(--radius);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: border-color 0.3s, background 0.3s;
  cursor: pointer;
}

.livrable-upload-zone:hover,
.livrable-upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-dim);
  color: var(--primary);
}

.livrable-notes {
  width: 100%;
  min-height: 80px;
  padding: 0.7rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  resize: vertical;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  margin-top: 0.75rem;
}

.livrable-notes:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.livrable-actions {
  display: none;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  gap: 0.5rem;
}

body.is-admin .livrable-actions {
  display: flex;
  flex-wrap: wrap;
}

/* ============================================
   8. ADMIN ELEMENTS
   ============================================ */
.admin-only {
  display: none !important;
}

.admin-only-cell {
  display: none !important;
}

body.is-admin .admin-only {
  display: block !important;
}

body.is-admin .admin-only-cell {
  display: table-cell !important;
}

body.is-admin .admin-only-inline {
  display: inline-flex !important;
}

/* Inline variants */
body.is-admin span.admin-only,
body.is-admin a.admin-only,
body.is-admin button.admin-only {
  display: inline-flex !important;
}

.admin-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1rem;
  opacity: 0.5;
}

.admin-login-btn:hover {
  opacity: 1;
  border-color: var(--primary);
  color: var(--primary);
}

.admin-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(9, 21, 43, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.admin-modal.open {
  display: flex;
}

.admin-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  max-width: 400px;
  width: 90%;
}

.admin-modal-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.admin-modal-content input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.admin-modal-content input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.admin-modal-content button[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: var(--shadow-sm);
}

.admin-modal-content button[type="submit"]:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow);
}

.admin-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  background: var(--primary);
  color: white;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.btn-admin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: white;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.btn-admin-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-admin-toggle.active {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* Delete button (admin action) */
.btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--red-border);
  border-radius: var(--radius);
  background: var(--red-bg);
  color: var(--red);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-delete:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

/* ============================================
   9. FEEDBACK WIDGETS
   ============================================ */
.feedback-widget {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.feedback-widget .comment-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: white;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  font-family: var(--font-body);
}

.feedback-widget .comment-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.feedback-widget .comment-btn.has-comment {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

.feedback-widget .comment-area {
  display: none;
  width: 100%;
  margin-top: 0.75rem;
}

.feedback-widget .comment-area.open {
  display: block;
}

.feedback-widget .comment-area textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.6rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}

.feedback-widget .comment-area textarea:focus {
  border-color: var(--primary);
}

.feedback-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

.feedback-save-btn:hover {
  background: var(--primary-light);
}

.feedback-export-btn {
  display: none;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  background: white;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
}

body.is-admin .feedback-export-btn {
  display: inline-flex;
}

.feedback-export-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Feedback status indicators */
.feedback-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
}

.feedback-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feedback-status-new {
  color: #991B1B;
  background: var(--red-bg);
}

.feedback-status-new::before {
  background: var(--red);
}

.feedback-status-read {
  color: #92400E;
  background: var(--orange-bg);
}

.feedback-status-read::before {
  background: var(--orange);
}

.feedback-status-resolved {
  color: #065F46;
  background: var(--green-bg);
}

.feedback-status-resolved::before {
  background: var(--green);
}

.feedback-prompt {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

/* ============================================
   9b. LIVRABLE CARD EXPAND/COLLAPSE
   ============================================ */
.livrable-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  flex-wrap: wrap;
}

.livrable-header .livrable-num {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  min-width: 3rem;
}

.livrable-header .livrable-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.livrable-expand {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.3s;
  margin-left: auto;
}

.livrable-card.open .livrable-expand {
  transform: rotate(180deg);
}

.livrable-body {
  display: none;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

.livrable-card.open .livrable-body {
  display: block;
}

.livrable-limits {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ============================================
   9c. TIMELINE / EXCHANGES (WhatsApp-style)
   ============================================ */
.timeline-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.timeline-section h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timeline-section h5 i {
  color: var(--primary);
}

.timeline-messages {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.timeline-messages::-webkit-scrollbar {
  width: 5px;
}

.timeline-messages::-webkit-scrollbar-track {
  background: transparent;
}

.timeline-messages::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: 3px;
}

.timeline-empty {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 1.5rem 0;
  font-style: italic;
}

/* Message bubbles */
.timeline-msg {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.5;
  position: relative;
}

.timeline-msg-orrtyl {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.timeline-msg-client {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--text-dark);
  border: 1px solid var(--border-card);
  border-bottom-left-radius: 4px;
}

.timeline-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.timeline-msg-author {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.timeline-msg-orrtyl .timeline-msg-author {
  color: rgba(255, 255, 255, 0.85);
}

.timeline-msg-client .timeline-msg-author {
  color: var(--primary);
}

.timeline-msg-date {
  font-size: 0.68rem;
  opacity: 0.7;
}

.timeline-msg-orrtyl .timeline-msg-date {
  color: rgba(255, 255, 255, 0.7);
}

.timeline-msg-client .timeline-msg-date {
  color: var(--text-muted);
}

.timeline-msg-content {
  word-break: break-word;
  white-space: pre-wrap;
}

.timeline-msg-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
}

.timeline-msg-orrtyl .timeline-msg-attachment {
  color: rgba(255, 255, 255, 0.9);
}

.timeline-msg-client .timeline-msg-attachment {
  color: var(--primary);
}

/* Timeline input */
.timeline-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-textarea {
  width: 100%;
  min-height: 52px;
  max-height: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-dark);
  resize: vertical;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.timeline-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-dim);
}

.timeline-input-actions {
  display: flex;
  justify-content: flex-end;
}

.timeline-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.timeline-send-btn:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.timeline-send-btn:active {
  transform: translateY(0);
}

/* ============================================
   10. RESPONSIVE -- TABLET (768px)
   ============================================ */
@media (max-width: 768px) {
  /* Filters stack vertically */
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.85rem;
  }

  .filter-select {
    width: 100%;
    min-width: unset;
  }

  .filter-tag {
    font-size: 0.75rem;
  }

  /* Timer responsive */
  .timer-controls {
    flex-direction: column;
    gap: 0.75rem;
  }

  .timer-btn-start,
  .timer-btn-stop,
  .btn-timer {
    width: 100%;
    justify-content: center;
  }

  /* Time summary responsive */
  .time-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Time entry rows */
  .time-entry-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* CR sections */
  .cr-entry {
    padding: 1rem;
  }

  /* Livrable cards */
  .livrable-card {
    padding: 1rem;
  }

  /* Timeline responsive */
  .timeline-msg {
    max-width: 90%;
  }

  .timeline-messages {
    max-height: 250px;
  }

  .livrable-phase-header {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  /* Feedback widget */
  .feedback-widget {
    flex-wrap: wrap;
  }

  /* Admin modal */
  .admin-modal-content {
    padding: 1.5rem;
  }
}

/* ============================================
   11. RESPONSIVE -- MOBILE (640px)
   ============================================ */
@media (max-width: 640px) {
  .filter-bar {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .filter-bar select {
    min-width: 100px;
    font-size: 0.8rem;
  }

  .filter-group {
    flex-basis: 100%;
  }

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

  .time-summary {
    grid-template-columns: 1fr;
  }

  .time-summary-card .summary-value {
    font-size: 1.3rem;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timer-display {
    font-size: 2.2rem;
    padding: 1.25rem 0.75rem;
  }

  .btn-timer {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .summary-total {
    flex-direction: column;
    text-align: center;
    gap: 0.35rem;
  }

  .duration-field .form-control {
    width: 60px;
  }

  .cr-section-header {
    padding: 0.7rem 0.85rem;
  }

  .cr-section-body {
    padding: 0.85rem;
  }

  .cr-section-title {
    font-size: 0.85rem;
  }

  .cr-tree {
    font-size: 0.75rem;
    padding: 0.85rem;
  }

  /* CR table mobile -- stacked layout (matches .info-table mobile) */
  .cr-table,
  .cr-table thead,
  .cr-table tbody,
  .cr-table tr,
  .cr-table td,
  .cr-table th {
    display: block;
    width: 100%;
  }

  .cr-table thead {
    display: none;
  }

  .cr-table tr {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-page);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--primary);
  }

  .cr-table td {
    padding: 0.3rem 0;
    border-bottom: none;
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .cr-table td:before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 0.15rem;
  }

  .cr-table td:first-child {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    padding-bottom: 0.15rem;
  }

  /* Livrable upload zone smaller */
  .livrable-upload-zone {
    padding: 1rem;
    font-size: 0.8rem;
  }

  /* Admin badge smaller */
  .admin-badge {
    font-size: 0.55rem;
  }

  body.is-admin .admin-only-cell {
    display: block !important;
  }

  /* Feedback stacked */
  .feedback-widget {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   12. RESPONSIVE -- VERY SMALL (380px)
   ============================================ */
@media (max-width: 380px) {
  .timer-display {
    font-size: 2rem;
    padding: 1rem 0.5rem;
  }

  .cr-section-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }

  .livrable-phase-header {
    font-size: 0.85rem;
    padding: 0.6rem 0.85rem;
  }

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

/* ============================================
   CR — Card list + Topic detail
   ============================================ */

.cr-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.cr-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.cr-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cr-card-meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.cr-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* CR Topic (dedicated page) */
.cr-topic {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cr-topic-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
}

.cr-topic-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.cr-topic-summary {
  flex: 1;
}

.cr-topic-summary h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.cr-topic-summary p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.cr-detail-btn {
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.cr-detail-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cr-topic-detail {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}

.cr-topic-detail.open {
  display: block;
  padding-top: 1.25rem;
}

.cr-topic-detail p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.cr-topic-detail strong {
  color: var(--text-dark);
}

.cr-topic-detail em {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   ARBITRAGES
   ============================================ */

.plan-version-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.plan-version-badge {
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.arbitrage-changes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.arb-change {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.arb-change-ajout { background: var(--green-bg); }
.arb-change-modification { background: var(--orange-bg); }
.arb-change-suppression { background: var(--red-bg); }

.arb-change-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.arb-badge-ajout { background: var(--green); color: white; }
.arb-badge-modification { background: var(--orange); color: white; }
.arb-badge-suppression { background: var(--red); color: white; }

.arb-change-item-id {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}

/* Arbitrage form */
.arb-change-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.arb-change-row select,
.arb-change-row input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: var(--bg-card);
  color: var(--text-dark);
}

.arb-change-row select { width: 160px; }
.arb-change-row .arb-change-item { width: 120px; }
.arb-change-row .arb-change-desc { flex: 1; min-width: 200px; }

.btn-secondary {
  padding: 0.4rem 0.8rem;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   RESPONSIVE — CR Topics, Arbitrages
   ============================================ */

@media (max-width: 768px) {
  .cr-topic-header { flex-wrap: wrap; }
  .cr-detail-btn { margin-top: 0.5rem; }
  .arb-change-row { flex-direction: column; }
  .arb-change-row select, .arb-change-row input { width: 100%; }
}

@media (max-width: 640px) {
  .cr-card-meta { flex-direction: column; gap: 0.4rem; }
}

/* Timeline author badge */
.timeline-author-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.timeline-author-badge strong {
  color: var(--text-dark);
}
body.is-admin .timeline-author-badge {
  background: var(--primary-bg);
  border-color: var(--primary-dim);
}
body.is-admin .timeline-author-badge strong {
  color: var(--primary);
}
