* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f6f8;
  color: #1a1a2e;
  min-height: 100vh;
}

header {
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 { font-size: 20px; font-weight: 700; }

#refresh-btn {
  background: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s;
}
#refresh-btn:hover { background: #f0f0f0; }

/* Kanban */
.kanban-board {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  overflow-x: auto;
  min-height: calc(100vh - 70px);
}

.kanban-column {
  flex: 1;
  min-width: 280px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
}

.column-header {
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #fff;
}
.column-header.blue { background: #3b82f6; }
.column-header.orange { background: #f59e0b; }
.column-header.purple { background: #8b5cf6; }
.column-header.green { background: #10b981; }

.column-cards {
  flex: 1;
  background: #eef0f4;
  border-radius: 0 0 12px 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.column-cards.drag-over {
  background: #dbeafe;
  outline: 2px dashed #3b82f6;
}

/* Cards */
.briefing-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  border-left: 4px solid transparent;
}
.briefing-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  transform: translateY(-1px);
}
.briefing-card[draggable="true"] { cursor: grab; }
.briefing-card.dragging { opacity: .5; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.card-id {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.video { background: #dbeafe; color: #2563eb; }
.badge.image { background: #d1fae5; color: #059669; }

.card-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #9ca3af;
}

.card-deadline { font-weight: 500; }
.card-deadline.overdue { color: #ef4444; font-weight: 700; }
.card-deadline.soon { color: #f59e0b; }

.card-assignee {
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 999px;
}

.card-warnings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.warning-badge {
  font-size: 10px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 6px;
  border-radius: 4px;
}

.priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.priority-dot.high { background: #ef4444; }
.priority-dot.medium { background: #f59e0b; }
.priority-dot.low { background: #10b981; }

/* Detail Panel */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}
.overlay.hidden { display: none; }

.detail-panel {
  width: 680px;
  max-width: 95vw;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  padding: 32px;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  position: relative;
  animation: slideIn .2s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:hover { background: #e5e7eb; }

.detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  padding-right: 40px;
}

.detail-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 24px;
}

.detail-section {
  margin-bottom: 24px;
}

.section-header {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
}

.section-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}
.info-grid .label {
  color: #6b7280;
  font-weight: 500;
}
.info-grid .value { color: #1f2937; }

.text-block {
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #374151;
}

.speaker-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 8px;
}

/* Status dropdown */
.status-select {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}

/* Upload / Variants */
.variant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.variant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
}

.variant-name { flex: 1; font-weight: 500; }
.variant-status { font-size: 12px; }
.variant-status.uploaded { color: #059669; }
.variant-status.missing { color: #9ca3af; }

.upload-btn {
  padding: 4px 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.upload-btn:hover { background: #2563eb; }

.upload-progress {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin-top: 4px;
  display: none;
}
.upload-progress .bar {
  height: 100%;
  background: #3b82f6;
  border-radius: 2px;
  transition: width .2s;
}

.drive-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  background: #f3f4f6;
  border-radius: 8px;
  text-decoration: none;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}
.drive-link:hover { background: #e5e7eb; }

/* Responsive */
@media (max-width: 900px) {
  .kanban-board { padding: 12px; }
  .kanban-column { min-width: 260px; }
  .detail-panel { width: 100vw; padding: 20px; }
}
