/* === Variables === */
:root {
  --color-bg: #f5f0eb;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-border: #e0d8d0;
  --color-primary: #4A5568;
  --color-completed: #27AE60;
  --color-in-progress: #3498DB;
  --color-waiting: #F39C12;
  --color-delayed: #E74C3C;
  --color-pending: #BDC3C7;
  --color-editora: #8E44AD;
  --color-autor: #2980B9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* === Reset === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
.header {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: var(--shadow-md);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  font-size: 1.3rem;
  opacity: 0.8;
}

.subtitle {
  font-size: 0.95rem;
  opacity: 0.7;
  font-weight: 400;
}

.assignee-selector {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}

.assignee-selector select {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}

.assignee-selector select option {
  color: #222;
}

.tab-count-mine {
  background: #2e7d32;
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* === Views === */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === List Header === */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.list-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
}

.legend {
  display: flex;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-completed { background: var(--color-completed); }
.dot-delayed { background: var(--color-delayed); }
.dot-waiting { background: var(--color-waiting); }

/* === Book Grid === */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

/* === Book Card === */
.book-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 5px solid var(--color-pending);
  position: relative;
}

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

.book-card.status-on-track {
  border-left-color: var(--color-completed);
}

.book-card.status-delayed {
  border-left-color: var(--color-delayed);
}

.book-card.status-waiting {
  border-left-color: var(--color-waiting);
}

.book-card.status-almost-done {
  border-left-color: var(--color-completed);
}

.book-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.book-card-author {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.book-card-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.status-badge {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-on-track {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-delayed {
  background: #fce4ec;
  color: #c62828;
}

.badge-waiting {
  background: #fff3e0;
  color: #e65100;
}

.badge-almost-done {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-deadline-risk {
  background: #b71c1c;
  color: #fff;
  font-weight: 600;
  margin-left: 0.4rem;
}

.book-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.book-deadline {
  margin-top: 0.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  font-size: 0.88rem;
}

.book-deadline.deadline-over {
  background: #fce4ec;
  color: #b71c1c;
  border-left: 3px solid #b71c1c;
}

.book-deadline.deadline-safe {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 3px solid #2e7d32;
}

.book-deadline.deadline-none {
  background: var(--color-bg-alt, #f4f4f4);
  color: var(--color-text-muted);
}

.deadline-hint {
  font-style: italic;
  font-size: 0.82rem;
}

.kanban-card-deadline {
  font-size: 0.74rem;
  color: #b71c1c;
  font-weight: 600;
  padding: 0.3rem 0;
  border-top: 1px dashed #fce4ec;
  margin-bottom: 0.3rem;
}

/* === Step duration edit === */
.step-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.step-duration.duration-custom {
  color: #6a4f00;
  background: #fff8e1;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
}

.duration-badge {
  font-size: 0.78rem;
}

.btn-edit-duration {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-edit-duration:hover {
  background: var(--color-bg-alt, #f4f4f4);
  color: var(--color-text);
}

/* === WhatsApp / Header actions === */
.book-header-actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  align-self: flex-start;
}

.whatsapp-textarea {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  padding: 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  resize: vertical;
  line-height: 1.4;
}

/* === Problems Panel === */
.problems-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.problems-empty {
  text-align: center;
  padding: 3rem 1rem;
  background: #e8f5e9;
  border-radius: 8px;
  color: #2e7d32;
}

.problems-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.problems-empty h3 {
  margin: 0 0 0.3rem;
}

.problem-section {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
  overflow: hidden;
  border-left: 4px solid #ccc;
}

.problem-section-critical { border-left-color: #b71c1c; }
.problem-section-byClient { border-left-color: #e65100; }
.problem-section-byUs { border-left-color: #c62828; }

.problem-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: var(--color-bg-alt, #fafafa);
  border-bottom: 1px solid var(--color-border);
}

.problem-section-header h3 {
  margin: 0;
  font-size: 1rem;
}

.problem-section-count {
  background: rgba(0,0,0,0.07);
  border-radius: 12px;
  padding: 0.15rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.problem-list {
  display: flex;
  flex-direction: column;
}

.problem-row {
  display: grid;
  grid-template-columns: 6px 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--color-border);
}

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

.problem-cover {
  width: 6px;
  height: 100%;
  min-height: 40px;
  border-radius: 3px;
}

.problem-main {
  min-width: 0;
}

.problem-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.1rem;
}

.problem-author {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.problem-step {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.problem-metrics {
  text-align: right;
}

.problem-metric {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  white-space: nowrap;
}

.metric-overdue {
  background: #fce4ec;
  color: #c62828;
}

.metric-waiting {
  background: #fff3e0;
  color: #e65100;
}

.metric-critical {
  background: #b71c1c;
  color: #fff;
}

.problem-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn-small {
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
}

/* Tab count badge */
.tab-count {
  display: inline-block;
  background: #b71c1c;
  color: #fff;
  border-radius: 10px;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  margin-left: 0.3rem;
  font-weight: 600;
  min-width: 1.2rem;
  text-align: center;
}

.toggle-btn:not(.active) .tab-count {
  background: #b71c1c;
}

@media (max-width: 720px) {
  .problem-row {
    grid-template-columns: 6px 1fr;
    grid-template-areas: "cover main" ". metrics" ". actions";
  }
  .problem-cover { grid-area: cover; }
  .problem-main { grid-area: main; }
  .problem-metrics { grid-area: metrics; text-align: left; }
  .problem-actions { grid-area: actions; }
}

.book-card-step {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-fill.fill-on-track { background: var(--color-completed); }
.progress-fill.fill-delayed { background: var(--color-delayed); }
.progress-fill.fill-waiting { background: var(--color-waiting); }
.progress-fill.fill-almost-done { background: var(--color-completed); }

/* === Back Button === */
.btn-back {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.btn-back:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

/* === Book Header (Timeline view) === */
.book-header {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.book-cover {
  width: 60px;
  height: 80px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.book-info h2 {
  font-size: 1.4rem;
  margin-bottom: 0.2rem;
}

.book-info p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.book-info .book-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

/* === Timeline === */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-border);
  border-radius: 2px;
}

/* === Timeline Step === */
.timeline-step {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

/* Node dot */
.timeline-node {
  position: absolute;
  left: -2rem;
  top: 1.4rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--color-border);
  z-index: 1;
}

.timeline-node.node-completed {
  background: var(--color-completed);
  box-shadow: 0 0 0 2px var(--color-completed);
}

.timeline-node.node-in-progress {
  background: var(--color-in-progress);
  box-shadow: 0 0 0 2px var(--color-in-progress);
  animation: pulse 2s infinite;
}

.timeline-node.node-waiting {
  background: var(--color-waiting);
  box-shadow: 0 0 0 2px var(--color-waiting);
  animation: pulse 2s infinite;
}

.timeline-node.node-delayed {
  background: var(--color-delayed);
  box-shadow: 0 0 0 2px var(--color-delayed);
  animation: pulse 2s infinite;
}

.timeline-node.node-pending {
  background: #eee;
  box-shadow: 0 0 0 2px var(--color-border);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px currentColor; }
  50% { box-shadow: 0 0 0 5px rgba(0,0,0,0.1); }
}

/* Step Card */
.step-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow-md);
}

.step-card.card-delayed {
  border-left: 4px solid var(--color-delayed);
}

.step-card.card-waiting {
  border-left: 4px solid var(--color-waiting);
}

.step-card.card-in-progress {
  border-left: 4px solid var(--color-in-progress);
}

.step-card.card-completed {
  border-left: 4px solid var(--color-completed);
}

.step-card.card-pending {
  border-left: 4px solid var(--color-pending);
  opacity: 0.7;
}

.step-card.card-was-delayed {
  border-left: 4px solid var(--color-delayed);
}

/* Step header */
.step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.step-name {
  font-size: 1rem;
  font-weight: 600;
}

.step-iteration {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.step-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.badge-responsible {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-editora {
  background: #f3e5f5;
  color: var(--color-editora);
}

.badge-autor {
  background: #e3f2fd;
  color: var(--color-autor);
}

.step-status-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 500;
}

.step-status-completed { background: #e8f5e9; color: #2e7d32; }
.step-status-in-progress { background: #e3f2fd; color: #1565c0; }
.step-status-waiting { background: #fff3e0; color: #e65100; }
.step-status-delayed { background: #fce4ec; color: #c62828; }
.step-status-pending { background: #f5f5f5; color: #9e9e9e; }

/* Step dates */
.step-dates {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.step-dates .date-label {
  font-weight: 500;
  color: var(--color-text);
}

.step-dates .date-estimated {
  font-style: italic;
  color: var(--color-waiting);
}

/* Delay warning */
.delay-info {
  font-size: 0.82rem;
  color: var(--color-delayed);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Waiting warning */
.waiting-warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-size: 0.82rem;
  color: #f57f17;
  margin-bottom: 0.5rem;
}

/* Step actions */
.step-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn:hover {
  background: #f5f5f5;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  opacity: 0.9;
  background: var(--color-primary);
}

.btn-success {
  background: var(--color-completed);
  color: white;
  border-color: var(--color-completed);
}

.btn-success:hover {
  opacity: 0.9;
}

.btn-success:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.comment-item,
.history-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.comment-item:last-child,
.history-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.history-icon {
  font-size: 1rem;
  width: 1.2rem;
  display: inline-flex;
  justify-content: center;
}

.history-text {
  font-size: 0.88rem;
  margin-top: 0.3rem;
  color: var(--color-text-muted);
}

.history-text code {
  background: var(--color-bg-alt, #f4f4f4);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.82rem;
}

.history-status .history-icon { color: var(--color-completed); }
.history-attachment .history-icon { color: #4A90D9; }
.history-duration .history-icon { color: var(--color-delayed); }

.comment-author {
  font-weight: 600;
  font-size: 0.9rem;
}

.comment-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-left: 0.5rem;
}

.comment-text {
  font-size: 0.9rem;
  margin-top: 0.3rem;
  color: var(--color-text);
}

.no-comments {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
}

.modal-footer input {
  flex: 1;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}

.modal-footer input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  z-index: 200;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* === View Toggle === */
.list-header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: flex;
  background: var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.toggle-btn {
  padding: 0.35rem 0.8rem;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.toggle-btn.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.toggle-btn:hover:not(.active) {
  color: var(--color-text);
}

/* === Kanban Board === */
.kanban-board {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  height: calc(100vh - 220px);
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-left: 2rem;
  padding-right: 2rem;
}

.kanban-column {
  min-width: 180px;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--color-surface);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid var(--color-border);
}

.kanban-column-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.kanban-column-count {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--color-border);
  color: var(--color-text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-column-body {
  flex: 1;
  background: #ece7e1;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
}

.kanban-card {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  border-left: 4px solid var(--color-pending);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.kanban-card.status-on-track {
  border-left-color: var(--color-completed);
}

.kanban-card.status-delayed {
  border-left-color: var(--color-delayed);
}

.kanban-card.status-waiting {
  border-left-color: var(--color-waiting);
}

.kanban-card.status-almost-done {
  border-left-color: var(--color-completed);
}

.kanban-card-cover {
  height: 6px;
  width: 100%;
}

.kanban-card-content {
  padding: 0.7rem 0.8rem;
}

.kanban-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.kanban-card-author {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-card-progress {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* === Responsive === */
@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    gap: 0.3rem;
  }

  .container {
    padding: 1rem;
  }

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

  .book-header {
    flex-direction: column;
    text-align: center;
  }

  .step-header {
    flex-direction: column;
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-header-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .kanban-board {
    gap: 0.8rem;
  }

  .kanban-column {
    min-width: 200px;
    flex: 1 0 200px;
  }
}
