/* ==========================================================
   ContentFlow — Milk Coffee Aesthetic
   Warm, refined, editorial design language
   ========================================================== */

:root {
  /* ── Milk Coffee Palette ── */
  --latte:        #FAF6F1;
  --cream:        #F3ECE2;
  --foam:         #EDE4D8;
  --caramel:      #D4C4AE;
  --mocha:        #B8A48E;
  --espresso:     #6B5B4E;
  --dark-roast:   #4A3C31;
  --black-coffee: #2C2218;

  /* ── Semantic Mapping ── */
  --bg-body:      #FAF6F1;
  --bg-surface:   #FFFFFF;
  --bg-column:    #F7F1EA;
  --bg-card:      #FFFFFF;
  --bg-hover:     #F3ECE2;
  --bg-input:     #FAF6F1;
  --bg-inset:     #F0E8DC;

  --text-primary:   #1A1410;
  --text-secondary: #4A3C31;
  --text-muted:     #8A7A6A;
  --text-hint:      #B0A494;

  --border:       #E8DFD2;
  --border-light: #F0E8DC;
  --border-focus: #B8A48E;

  /* ── Accent Colors (warm-tuned) ── */
  --accent:       #9C7B5C;
  --accent-hover: #8A6A4C;
  --accent-light: #F0E6D8;

  --clr-urgent:   #C4564A;
  --clr-high:     #D4864A;
  --clr-medium:   #C4A84A;
  --clr-low:      #A8A898;
  --clr-green:    #6A9E78;
  --clr-blue:     #5E8BA8;
  --clr-purple:   #8E7AAE;
  --clr-pink:     #B87A8E;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 2px rgba(44,34,24,0.04);
  --shadow-sm:  0 2px 8px rgba(44,34,24,0.06);
  --shadow-md:  0 4px 16px rgba(44,34,24,0.08);
  --shadow-lg:  0 8px 32px rgba(44,34,24,0.10);
  --shadow-xl:  0 16px 48px rgba(44,34,24,0.14);

  /* ── Radii ── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* ── Transitions ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.35s var(--ease) both;
}

.login-logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 32px;
  text-align: center;
  color: var(--dark-roast);
  margin-bottom: 8px;
}

.login-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-hint);
  margin-bottom: 32px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 8px;
}
.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  text-align: center;
  color: var(--clr-urgent);
  font-size: 13px;
  font-weight: 600;
  margin-top: 14px;
}

/* ── User Badge in Header ── */
.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1.5px solid var(--border);
}
.user-badge-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Admin Badge ── */
.admin-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  background: var(--clr-urgent);
  color: white;
  vertical-align: middle;
  margin-left: 4px;
}

.member-username {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ── Form Extras ── */
.form-divider {
  border-top: 1.5px dashed var(--border);
  margin: 8px 0 18px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500 !important;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.checkbox-hint {
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 400;
  margin-left: 4px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: clip;
}

/* linen / canvas texture — warm tactile grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23d6c8b4' fill-opacity='0.08'/%3E%3Crect x='0' y='0' width='1' height='1' fill='%23c4b6a0' fill-opacity='0.06'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23c4b6a0' fill-opacity='0.06'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cline x1='0' y1='0' x2='20' y2='20' stroke='%23c8b898' stroke-width='0.3' stroke-opacity='0.07'/%3E%3Cline x1='20' y1='0' x2='0' y2='20' stroke='%23c8b898' stroke-width='0.3' stroke-opacity='0.05'/%3E%3C/svg%3E");
}

#app { position: relative; z-index: 1; }

/* ═══════════════════════════════════════
   HEADER
   ═══════════════════════════════════════ */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 32px;
  height: 68px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.header-left { display: flex; align-items: center; gap: 36px; }
.header-right { display: flex; align-items: center; gap: 14px; }

.logo {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark-roast);
  letter-spacing: -0.3px;
}

.nav-tabs { display: flex; gap: 2px; }
.nav-tabs button {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.01em;
}
.nav-tabs button:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.nav-tabs button.active {
  background: var(--dark-roast);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}

.search-box { position: relative; }
.search-box input {
  padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  width: 230px;
  outline: none;
  transition: all 0.25s var(--ease);
}
.search-box input::placeholder { color: var(--text-hint); }
.search-box input:focus {
  border-color: var(--mocha);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(156,123,92,0.1);
  width: 280px;
}
.search-box .search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 13px; opacity: 0.5;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  padding: 9px 22px;
  border: none;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--dark-roast);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--black-coffee);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  background: var(--foam);
  border-color: var(--caramel);
}
.btn-sm { padding: 5px 14px; font-size: 12.5px; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  padding: 6px; font-size: 15px; border-radius: var(--r-sm);
  transition: all 0.2s var(--ease); color: var(--text-muted);
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-secondary); }
.btn-tiny { font-size: 12px; opacity: 0.35; padding: 2px; }
.btn-tiny:hover { opacity: 0.8; }

/* ═══════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════ */
.kanban-view { padding: 24px 32px; }

.kanban-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.kanban-filters select {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.kanban-filters select:focus { border-color: var(--mocha); }
.filter-count {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: auto;
  font-weight: 500;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  min-height: calc(100vh - 170px);
}

.kanban-column {
  background: var(--bg-column);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.column-header {
  padding: 18px 16px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, transparent 100%);
}
.column-icon { font-size: 15px; }
.column-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}
.column-count {
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.column-body {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.column-empty {
  text-align: center;
  color: var(--text-hint);
  padding: 40px 16px;
  font-size: 13px;
  font-style: italic;
}

/* ── Project Card ── */
.project-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-xs);
  position: relative;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--caramel);
  transform: translateY(-3px);
}
.project-card:hover::after { opacity: 1; }
.project-card.dragging { opacity: 0.4; transform: rotate(2deg); }

.card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-priority {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
  flex-shrink: 0;
}
.priority-urgent {
  background: var(--clr-urgent);
  box-shadow: 0 0 0 3px rgba(196,86,74,0.15);
}
.priority-high { background: var(--clr-high); }
.priority-medium { background: var(--clr-medium); }
.priority-low { background: var(--clr-low); }

.card-category {
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 9px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--espresso);
}

.card-title {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.45;
  color: var(--text-primary);
}
.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px;
}
.card-deadline.overdue { color: var(--clr-urgent); font-weight: 700; }

.card-tasks { margin-bottom: 10px; }
.task-progress { display: flex; align-items: center; gap: 8px; }
.progress-bar {
  flex: 1; height: 5px;
  background: var(--bg-inset);
  border-radius: 100px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--clr-green);
  border-radius: 100px;
  transition: width 0.4s var(--ease);
}
.progress-text { font-size: 11px; color: var(--text-hint); white-space: nowrap; font-weight: 600; }

/* ── Assignment Badges on Kanban Cards ── */
.card-assignments { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.assignment-badge {
  font-size: 10.5px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--bg-inset);
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}
.assignment-badge.is-active {
  background: var(--espresso);
  color: var(--cream);
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

/* ── Mobile Card Actions (hidden on desktop) ── */
.mobile-card-actions { display: none; }
.mobile-status-select {
  width: 100%;
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

/* ═══════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════ */
.dashboard-view { padding: 28px 32px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.stat-number {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 42px;
  font-weight: 400;
  color: var(--accent);
  line-height: 1.1;
}
.stat-warning .stat-number { color: var(--clr-urgent); }
.stat-info .stat-number { color: var(--clr-medium); }
.stat-success .stat-number { color: var(--clr-green); }
.stat-accent .stat-number { color: var(--clr-blue); }
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.dash-card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.dash-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--dark-roast);
}
.dash-card.full-width { grid-column: 1 / -1; }

.status-bar-item { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.bar-label {
  width: 56px; font-size: 12px; color: var(--text-muted);
  text-align: right; font-weight: 500;
}
.bar-track {
  flex: 1; height: 26px;
  background: var(--bg-inset);
  border-radius: var(--r-sm); overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: var(--r-sm);
  transition: width 0.6s var(--ease);
  min-width: 4px;
}
.bar-count { width: 28px; font-size: 15px; font-weight: 700; color: var(--text-secondary); }

.workload-list { display: flex; flex-direction: column; gap: 14px; }
.workload-item {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 0;
}
.workload-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--espresso); color: var(--cream);
  font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.workload-info { flex: 1; }
.workload-name { font-size: 14px; font-weight: 600; color: var(--dark-roast); }
.workload-detail { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.workload-bar {
  width: 84px; height: 7px;
  background: var(--bg-inset);
  border-radius: 100px; overflow: hidden;
}
.mini-bar { height: 100%; border-radius: 100px; transition: width 0.4s var(--ease); }

.role-tag {
  font-size: 10.5px; font-weight: 600;
  padding: 2.5px 9px; border-radius: 100px;
  display: inline-block; margin-left: 6px;
  letter-spacing: 0.03em;
}

/* ── Upcoming Deadlines ── */
.upcoming-list { display: flex; flex-direction: column; gap: 2px; }
.upcoming-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  border-bottom: 1px solid var(--border-light);
}
.upcoming-item:last-child { border-bottom: none; }
.upcoming-item:hover { background: var(--bg-hover); }
.upcoming-info { flex: 1; min-width: 0; }
.upcoming-title {
  font-size: 13.5px; font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.upcoming-meta { display: flex; gap: 12px; font-size: 12px; }
.upcoming-status { font-weight: 600; }
.upcoming-deadline { color: var(--text-muted); font-weight: 500; }
.upcoming-deadline.urgent { color: var(--clr-urgent); font-weight: 700; }

.activity-list { max-height: 400px; overflow-y: auto; }
.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-top: 6px; flex-shrink: 0;
}
.activity-content { flex: 1; font-size: 13px; line-height: 1.6; color: var(--text-secondary); }
.activity-actor { font-weight: 700; color: var(--dark-roast); }
.activity-project { color: var(--accent); font-weight: 500; }
.activity-detail { color: var(--text-muted); }
.activity-time { font-size: 11.5px; color: var(--text-hint); white-space: nowrap; font-weight: 500; }

/* ═══════════════════════════════════════
   SERIES (PROJECT GROUPS)
   ═══════════════════════════════════════ */
.series-view { padding: 28px 32px; }
.series-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.series-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px; font-weight: 400; color: var(--dark-roast);
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.series-card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  animation: fadeUp 0.35s var(--ease) both;
}
.series-card:nth-child(2) { animation-delay: 0.05s; }
.series-card:nth-child(3) { animation-delay: 0.10s; }
.series-card:nth-child(4) { animation-delay: 0.15s; }
.series-card:nth-child(5) { animation-delay: 0.20s; }
.series-card:nth-child(6) { animation-delay: 0.25s; }

.series-card:hover {
  border-color: var(--caramel);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.series-card-accent {
  height: 5px;
  width: 100%;
}

.series-card-body {
  padding: 20px 22px 22px;
}

.series-card-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}

.series-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  display: inline-block;
}
.series-type-badge.type-long {
  background: rgba(94,139,168,0.12);
  color: #5E8BA8;
}
.series-type-badge.type-short {
  background: rgba(196,168,74,0.12);
  color: #B89A3A;
}

.series-category {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--espresso);
}

.series-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.series-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.series-card-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 14px;
}

.series-stat {
  display: flex; flex-direction: column; align-items: center;
}
.series-stat-num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark-roast);
  line-height: 1.2;
}
.series-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

.series-progress {
  margin-top: 4px;
}
.series-progress .progress-bar {
  height: 6px;
}

.series-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-sub {
  font-size: 13px;
  color: var(--text-hint);
  margin-top: 6px;
}

/* ── Series Detail Modal ── */
.series-dot {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

.series-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 14px 16px;
  background: var(--bg-inset);
  border-radius: var(--r-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}

.series-detail-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.series-project-list {
  display: flex; flex-direction: column;
  gap: 2px;
}

.series-project-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease);
  border-bottom: 1px solid var(--border-light);
}
.series-project-item:last-child { border-bottom: none; }
.series-project-item:hover { background: var(--bg-hover); }

.sp-info { flex: 1; min-width: 0; }
.sp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-meta {
  display: flex; gap: 12px;
  font-size: 12.5px;
}
.sp-status { font-weight: 600; }
.sp-deadline { color: var(--text-muted); }
.sp-deadline.overdue { color: var(--clr-urgent); font-weight: 600; }

.sp-tasks {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}

.sp-assignees {
  display: flex; gap: 4px; flex-shrink: 0;
}

/* ── Card Series Tag (on kanban) ── */
.card-series-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid;
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Color Picker ── */
.color-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.color-option {
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-xs);
}
.color-option:hover {
  transform: scale(1.15);
}
.color-option.selected {
  border-color: var(--dark-roast);
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--dark-roast);
}

/* ═══════════════════════════════════════
   CALENDAR VIEW
   ═══════════════════════════════════════ */
.calendar-view { padding: 24px 32px; }

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark-roast);
  min-width: 140px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Calendar Grid ── */
.cal-grid-wrap {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow-x: auto;
  margin-bottom: 28px;
}
.cal-grid { min-width: 700px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-weekday {
  padding: 12px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cal-cell {
  min-height: 100px;
  height: auto;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  transition: background 0.15s var(--ease);
  cursor: default;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--bg-hover); }

.cal-cell.other-month {
  background: var(--bg-inset);
  opacity: 0.45;
}

.cal-cell.is-today {
  background: rgba(156,123,92,0.06);
}

/* Rest day (大小休 + 法定假日) */
.cal-cell.is-rest { background: rgba(196,86,74,0.04); }
.cal-cell.is-rest .cal-day-num { color: var(--clr-urgent); }
.cal-cell.is-holiday { background: rgba(196,86,74,0.08); }
.cal-cell.is-adjusted-work { background: rgba(156,123,92,0.06); }

.cal-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cal-rest-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 0px 4px;
  border-radius: 3px;
  line-height: 1.6;
}
.cal-rest-tag.tag-rest {
  background: rgba(196,86,74,0.12);
  color: var(--clr-urgent);
}
.cal-rest-tag.tag-work {
  background: rgba(156,123,92,0.15);
  color: var(--accent);
}

.cal-day-num.today-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--dark-roast);
  color: var(--cream);
  font-size: 12px;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cal-event {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}
.cal-event:hover {
  opacity: 0.85;
  transform: scale(1.02);
}
.cal-event-stage {
  opacity: 0.75;
  font-weight: 500;
  flex-shrink: 0;
}

.cal-event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.cal-more {
  font-size: 10px;
  color: var(--text-hint);
  font-weight: 600;
  padding: 1px 4px;
}

/* ── Team Timeline ── */
.timeline-section {
  margin-top: 8px;
}

.timeline-heading {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--dark-roast);
  margin-bottom: 16px;
}

.timeline-wrap {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.timeline-table {
  min-width: 960px;
}

.timeline-header-row {
  display: flex;
  border-bottom: 2px solid var(--border);
  background: var(--bg-inset);
  position: sticky;
  top: 68px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.timeline-header-row .timeline-name-col {
  z-index: 11;
  background: var(--bg-inset);
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  background: var(--bg-surface);
}
.timeline-row:last-child { border-bottom: none; }
.timeline-row:hover { background: rgba(156,123,92,0.02); }

.timeline-name-col {
  width: 160px;
  flex-shrink: 0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 2px solid var(--border);
  position: sticky;
  left: 0;
  z-index: 5;
  background: inherit;
}

.timeline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.timeline-member-info { min-width: 0; }
.timeline-member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline-member-role {
  font-size: 11px;
  color: var(--text-hint);
  font-weight: 500;
}

.timeline-days {
  flex: 1;
  display: flex;
  position: relative;
}

.timeline-day-header {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
}
.timeline-day-header:last-child { border-right: none; }
.timeline-day-header.is-today {
  background: rgba(156,123,92,0.12);
  color: var(--dark-roast);
  font-weight: 700;
}
.timeline-day-header.is-weekend,
.timeline-day-header.is-rest {
  color: var(--clr-urgent);
  opacity: 0.6;
}

.timeline-days-body {
  min-height: 44px;
}

.timeline-day-cell {
  flex: 1;
  border-right: 1px solid var(--border-light);
}
.timeline-day-cell:last-child { border-right: none; }
.timeline-day-cell.is-today {
  background: rgba(156,123,92,0.06);
}
.timeline-day-cell.is-weekend,
.timeline-day-cell.is-rest {
  background: rgba(196,86,74,0.02);
}

.timeline-bar {
  position: absolute;
  height: 24px;
  border-radius: 5px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: opacity 0.15s, filter 0.15s;
  box-shadow: var(--shadow-xs);
  z-index: 1;
}
.timeline-bar:hover {
  filter: brightness(1.1);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.timeline-bar.is-done {
  opacity: 0.35;
}

.bar-text {
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

/* ── Calendar Responsive ── */
@media (max-width: 1024px) {
  .calendar-toolbar { flex-direction: column; gap: 12px; align-items: flex-start; }
  .cal-cell { min-height: 70px; }
}
@media (max-width: 768px) {
  .calendar-view { padding: 16px; }
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-event { font-size: 10px; padding: 2px 4px; }
  .timeline-name-col { width: 120px; }
}

/* ═══════════════════════════════════════
   MEMBERS
   ═══════════════════════════════════════ */
.members-view { padding: 28px 32px; }
.members-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px;
}
.members-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--dark-roast);
}
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.member-card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all 0.3s var(--ease);
}
.member-card:hover {
  border-color: var(--caramel);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.member-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 20px; font-weight: 700;
  flex-shrink: 0; box-shadow: var(--shadow-sm);
}
.member-info { flex: 1; }
.member-info h4 { font-size: 15px; margin-bottom: 5px; font-weight: 600; color: var(--dark-roast); }
.member-info p { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.member-actions { display: flex; gap: 2px; }

/* ═══════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════ */
.settings-view { padding: 28px 32px; }
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.settings-card {
  background: var(--bg-surface);
  border-radius: var(--r-lg);
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.settings-card.span-2 { grid-column: span 2; }
/* Settings entry cards (overview tiles) */
.settings-entry-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-surface); border-radius: var(--r-lg);
  padding: 24px 28px; border: 1px solid var(--border);
  box-shadow: var(--shadow-xs); cursor: pointer;
  transition: all 0.2s ease;
}
.settings-entry-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(156, 123, 92, 0.12);
  transform: translateY(-2px);
}
.settings-entry-icon { font-size: 32px; flex-shrink: 0; }
.settings-entry-info { flex: 1; min-width: 0; }
.settings-entry-info h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 18px; font-weight: 400; color: var(--dark-roast); margin: 0 0 4px;
}
.settings-entry-info p {
  font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.4;
}
.settings-entry-count {
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: rgba(156, 123, 92, 0.1); padding: 4px 12px;
  border-radius: 12px; white-space: nowrap; flex-shrink: 0;
}
.settings-entry-arrow {
  font-size: 18px; color: var(--text-hint); flex-shrink: 0;
  transition: transform 0.2s;
}
.settings-entry-card:hover .settings-entry-arrow { transform: translateX(3px); color: var(--accent); }
/* Settings sub-view header */
.settings-sub-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.settings-sub-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 22px; font-weight: 400; color: var(--dark-roast);
  flex: 1; margin: 0;
}
.settings-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px; font-weight: 400; margin-bottom: 8px; color: var(--dark-roast);
}
.settings-desc { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; line-height: 1.6; }
.settings-hint {
  margin-top: 28px; padding: 20px;
  background: var(--bg-inset);
  border-radius: var(--r-md); font-size: 13px; color: var(--text-secondary);
  line-height: 1.7; border: 1px solid var(--border-light);
}
.settings-hint ol, .settings-hint ul { margin: 10px 0 0 20px; }
.settings-hint li { margin-bottom: 5px; }
.settings-hint p { margin-bottom: 10px; }
.settings-hint code {
  background: var(--cream); padding: 1px 6px; border-radius: 4px;
  font-family: 'Courier New', monospace; font-size: 12px; color: var(--accent);
}
.settings-note { color: var(--clr-urgent); font-weight: 500; }
/* Members inside settings */
.settings-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.settings-member-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-inset); border-radius: var(--r-md);
  padding: 14px; border: 1px solid var(--border-light);
}
.settings-member-card .member-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.settings-member-card .member-info { flex: 1; min-width: 0; }
.settings-member-card .member-info h4 { font-size: 14px; margin: 0 0 2px; font-weight: 600; color: var(--dark-roast); }
.settings-member-card .member-info .role-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; }
.settings-member-card .member-info p { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.settings-member-card .member-actions { display: flex; gap: 4px; flex-shrink: 0; }
/* Monitor panel */
.monitor-table {
  border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
}
.monitor-table-header {
  display: flex; gap: 0; padding: 10px 16px;
  background: var(--bg-inset); border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.monitor-table-row {
  display: flex; gap: 0; padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px; color: var(--text-primary);
  transition: background 0.15s;
}
.monitor-table-row:last-child { border-bottom: none; }
.monitor-table-row:hover { background: var(--bg-inset); }
.monitor-col-status { width: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.monitor-col-name { width: 200px; flex-shrink: 0; font-weight: 600; color: var(--dark-roast); }
.monitor-col-desc { flex: 1; color: var(--text-secondary); font-size: 13px; }
.monitor-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: 0 0 6px rgba(0,0,0,0.15);
}
.monitor-legend {
  display: flex; gap: 20px; margin-top: 16px; font-size: 12px; color: var(--text-muted);
}
.monitor-legend span { display: flex; align-items: center; gap: 6px; }
.monitor-today-bar {
  display: flex; gap: 24px; padding: 16px 20px;
  background: var(--bg-inset); border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}
.monitor-today-item { display: flex; align-items: center; gap: 10px; }
.monitor-today-label {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.monitor-today-value { font-size: 14px; font-weight: 500; color: var(--dark-roast); }
.is-rest-text { color: var(--clr-urgent); }
/* Feedback management inside settings */
.settings-feedback-list { max-height: 500px; overflow-y: auto; }
.settings-feedback-item {
  padding: 12px; margin-bottom: 8px;
  background: var(--bg-inset); border-radius: var(--r-md);
  border: 1px solid var(--border-light); font-size: 13px;
}
.settings-feedback-item .feedback-item-header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.settings-feedback-item .feedback-item-title { font-weight: 600; color: var(--dark-roast); margin-bottom: 4px; }
.settings-feedback-item .feedback-item-content { color: var(--text-secondary); line-height: 1.5; font-size: 12px; }
.webhook-url-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-inset); padding: 10px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
}
.webhook-url-box code {
  flex: 1; font-size: 13px; font-family: 'Courier New', monospace;
  color: var(--accent); word-break: break-all;
}
.json-example {
  background: var(--dark-roast); color: #e8dfd2; padding: 14px 18px;
  border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.7;
  font-family: 'Courier New', monospace; overflow-x: auto; margin: 8px 0;
  white-space: pre;
}
.settings-ref-hint { font-size: 12px; color: var(--text-hint); }

/* ── Holiday Management ── */
.holiday-add-row {
  display: flex; gap: 8px; margin-bottom: 10px; align-items: center;
}
.holiday-add-row input {
  padding: 7px 12px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-input); color: var(--text-primary); font-size: 13px;
  font-family: inherit; outline: none;
}
.holiday-add-row input:focus { border-color: var(--mocha); }
.holiday-list {
  max-height: 240px; overflow-y: auto;
  border: 1px solid var(--border-light); border-radius: var(--r-sm);
}
.holiday-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.holiday-item:last-child { border-bottom: none; }
.holiday-item:hover { background: var(--bg-hover); }
.holiday-date { font-family: 'Courier New', monospace; font-size: 12.5px; color: var(--text-muted); min-width: 100px; }
.holiday-name { flex: 1; font-weight: 500; color: var(--text-primary); }

/* ═══════════════════════════════════════
   FORMS
   ═══════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s var(--ease);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-hint); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--mocha);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(156,123,92,0.08);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ═══════════════════════════════════════
   MODALS
   ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(44,34,24,0.35);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal {
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
}
.modal-large { max-width: 920px; }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border-light);
}
.modal-header h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 19px; font-weight: 400; color: var(--dark-roast);
}
.modal-close {
  background: none; border: none;
  color: var(--text-hint); font-size: 26px;
  cursor: pointer; padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: all 0.2s;
  line-height: 1;
}
.modal-close:hover { color: var(--text-secondary); background: var(--bg-hover); }
.modal-body { padding: 28px; }
.modal-footer {
  padding: 18px 28px;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ═══════════════════════════════════════
   PROJECT DETAIL MODAL
   ═══════════════════════════════════════ */
.detail-header-left { display: flex; align-items: center; gap: 12px; }
.detail-header-right { display: flex; align-items: center; gap: 6px; }
.detail-body { display: grid; grid-template-columns: 1fr 280px; gap: 28px; }
.detail-sidebar {
  border-left: 1px solid var(--border-light);
  padding-left: 28px;
}
.detail-section { margin-bottom: 28px; }
.detail-section h4 {
  font-size: 14px; font-weight: 700;
  margin-bottom: 14px; color: var(--text-primary);
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.section-header h4 { margin-bottom: 0; }
.detail-info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; font-size: 13.5px; margin-bottom: 14px;
}
.detail-info-grid div { padding: 6px 0; }
.detail-info-grid strong { color: var(--text-secondary); font-weight: 500; }
.detail-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.7;
  padding: 14px 16px; background: var(--bg-inset);
  border-radius: var(--r-sm); border: 1px solid var(--border-light);
}

/* ── Assignment Pipeline (Project Detail) ── */
.assignment-hint {
  font-size: 12.5px;
  color: var(--text-hint);
  margin-bottom: 16px;
  line-height: 1.5;
}

.assignment-pipeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  transition: all 0.3s var(--ease);
}

.pipeline-stage.active {
  border-color: var(--accent);
  background: rgba(156,123,92,0.06);
  box-shadow: 0 0 0 3px rgba(156,123,92,0.08);
}

.pipeline-stage.completed {
  opacity: 0.55;
}

.stage-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-icon { font-size: 17px; }

.stage-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.active-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: white;
  letter-spacing: 0.02em;
}

.done-tag {
  font-size: 11px;
  color: var(--clr-green);
  font-weight: 700;
}

.stage-select {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  min-width: 160px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.stage-select:focus { border-color: var(--mocha); }

/* ── Assignment Form (Create/Edit Modal) ── */
.assignment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assignment-role-label {
  width: 90px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.assignment-row select {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.assignment-row select:focus { border-color: var(--mocha); }

/* Cameraman multi-select (expanded row) */
.assignment-row-expanded {
  flex-wrap: wrap;
}
.cameraman-config {
  width: 100%;
  flex: 1;
}
.cameraman-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.cam-count-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.cam-count-btns {
  display: flex;
  gap: 4px;
}
.cam-count-btns button {
  padding: 4px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.cam-count-btns button.active {
  background: var(--dark-roast);
  color: var(--cream);
  border-color: var(--dark-roast);
}
.cam-count-btns button:hover:not(.active) {
  border-color: var(--mocha);
  background: var(--bg-hover);
}
.cameraman-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cam-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cam-slot-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}
.cam-slot select {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.cam-slot select:focus { border-color: var(--mocha); }

/* Cameraman in pipeline detail */
.cameraman-detail-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.cam-detail-slot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cam-detail-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}
.cam-detail-slot .stage-select { flex: 1; }
.cam-add-btn {
  align-self: flex-start;
  margin-top: 2px;
  font-size: 11px !important;
  padding: 3px 10px !important;
}

/* Sub cameraman badge on kanban card */
.assignment-badge.assignment-sub {
  opacity: 0.75;
  font-size: 10.5px;
}

.empty-hint {
  text-align: center; color: var(--text-hint);
  padding: 24px; font-size: 13px; font-style: italic;
}

/* ── Comments ── */
.comment-input { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; }
.comment-author-tag {
  padding: 5px 12px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid var(--accent);
}
.comment-input input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-input); color: var(--text-primary);
  font-size: 13px; font-family: inherit; outline: none;
}
.comment-input input:focus { border-color: var(--mocha); }
.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px; line-height: 1.55;
}
.comment-item strong { color: var(--accent); margin-right: 8px; font-weight: 600; }
.comment-item small { display: block; color: var(--text-hint); font-size: 11px; margin-top: 3px; }

/* ── Sidebar Logs ── */
.log-list { max-height: 500px; overflow-y: auto; }
.log-item {
  display: flex; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px; line-height: 1.6;
  color: var(--text-secondary);
}
.log-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--caramel); margin-top: 6px; flex-shrink: 0;
}
.log-actor { font-weight: 700; color: var(--dark-roast); }
.log-time { font-size: 11px; color: var(--text-hint); }

/* ═══════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 18px;
  z-index: 9999;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(44,34,24,0.12);
  padding: 4px 6px;
  border-radius: 20px;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
/* PWA独立模式：贴底全宽 */
@media (display-mode: standalone) {
  .mobile-bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 12px rgba(44,34,24,0.08);
    padding: 4px 0;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  }
}
.mobile-bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 4px 8px;
  min-height: 48px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mobile-bottom-nav button.active {
  color: var(--accent);
}
.mobile-nav-icon { font-size: 20px; line-height: 1.2; }
.mobile-nav-label { font-size: 10px; font-weight: 600; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1400px) {
  .kanban-board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Tablet ── */
@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; }
  .app-header {
    flex-direction: column; height: auto;
    padding: 14px 20px; gap: 12px;
  }
  .header-left, .header-right { width: 100%; }
  .header-right { justify-content: space-between; }
  .search-box input { width: 100%; }
  .search-box input:focus { width: 100%; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-sidebar {
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding-left: 0; padding-top: 20px;
  }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .kanban-view, .dashboard-view, .members-view, .settings-view { padding: 16px; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  /* -- Show mobile bottom nav, hide desktop nav -- */
  .mobile-bottom-nav { display: flex; }
  .nav-tabs-desktop { display: none !important; }

  /* -- Body bottom padding for bottom nav (nav height + browser toolbar clearance) -- */
  body { padding-bottom: 110px; }

  /* -- Header simplification -- */
  .app-header {
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 8px;
  }
  .header-left {
    width: auto;
    flex: none;
  }
  .logo { font-size: 17px; }
  .header-right {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 8px;
    align-items: center;
  }
  .search-box { flex: 1; order: 1; }
  .search-box input { width: 100% !important; font-size: 13px; padding: 7px 10px 7px 32px; }
  .search-box input:focus { width: 100% !important; }
  .search-box .search-icon { left: 10px; }
  .btn-new-project { order: 2; padding: 7px 12px; font-size: 12px; white-space: nowrap; }
  .user-badge { order: 3; margin-left: 0; padding-left: 8px; border-left: 1px solid var(--border); }
  .user-badge-name { font-size: 12px; }

  /* -- Kanban: horizontal scroll -- */
  .kanban-view { padding: 12px; }
  .kanban-filters {
    flex-wrap: wrap;
    gap: 6px;
  }
  .kanban-filters select { padding: 5px 8px; font-size: 12px; flex: 1; min-width: 0; }
  .filter-count { width: 100%; text-align: right; font-size: 12px; }

  .kanban-board {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    min-height: auto;
    padding-bottom: 8px;
  }
  .kanban-column {
    min-width: 78vw;
    max-width: 78vw;
    scroll-snap-align: start;
    flex-shrink: 0;
    min-height: auto;
  }
  .column-header { padding: 12px 12px 10px; position: sticky; top: 0; z-index: 2; }
  .column-title { font-size: 12.5px; }
  .column-body { padding: 8px; gap: 6px; }
  .column-empty { padding: 24px 10px; font-size: 12px; }
  .kanban-column { border-top: 3px solid var(--border); }

  /* -- Project cards -- */
  .project-card { padding: 12px; }
  .project-card:hover { transform: none; }
  .project-card[draggable="true"] { -webkit-user-drag: none; }
  .card-title { font-size: 13.5px; }
  .card-desc { font-size: 12px; -webkit-line-clamp: 1; }
  .card-meta { font-size: 11.5px; gap: 6px; }
  .card-series-tag { font-size: 10px; padding: 2px 6px; }
  .assignment-badge { font-size: 9.5px; padding: 2px 6px; }
  .mobile-card-actions { display: block; margin-top: 8px; }

  /* -- Dashboard -- */
  .dashboard-view { padding: 12px; }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  .stat-card { padding: 14px 8px; }
  .stat-number { font-size: 26px; }
  .stat-label { font-size: 11px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 10px; }
  .dash-card { padding: 18px 14px; }
  .dash-card h3 { font-size: 15px; }

  /* -- Series -- */
  .series-view { padding: 12px; }
  .series-header { margin-bottom: 16px; }
  .series-header h2 { font-size: 18px; }
  .series-grid { grid-template-columns: 1fr !important; }

  /* -- Calendar -- */
  .calendar-view { padding: 12px; }
  .calendar-toolbar { flex-direction: column; gap: 8px; align-items: stretch; }
  .calendar-nav { justify-content: center; }
  .calendar-title { font-size: 16px !important; }
  .calendar-legend { justify-content: center; flex-wrap: wrap; gap: 6px; }
  .legend-item { font-size: 10px; }

  .cal-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid { font-size: 11px; min-width: 520px; }
  .cal-weekday { padding: 6px 2px; font-size: 11px; }
  .cal-cell { min-height: 48px; padding: 3px; }
  .cal-day-num { font-size: 11px; }
  .cal-event { font-size: 9px; padding: 1px 3px; border-radius: 3px; }
  .cal-event-stage { display: none; }

  .timeline-section { margin-top: 20px; }
  .timeline-heading { font-size: 15px; }
  .timeline-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .timeline-header-row { top: 0; }
  .timeline-table { min-width: 700px; }
  .timeline-name-col { width: 90px; font-size: 11px; }
  .timeline-avatar { width: 24px; height: 24px; font-size: 10px; }
  .timeline-member-name { font-size: 11px; }
  .timeline-member-role { font-size: 9px; }
  .timeline-day-header { font-size: 9px; }

  /* -- Members -- */
  .members-view { padding: 12px; }
  .members-header h2 { font-size: 18px; }
  .members-grid { grid-template-columns: 1fr !important; gap: 10px; }
  .member-card { padding: 14px; }

  /* -- Settings -- */
  .settings-view { padding: 12px; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-card { padding: 20px 16px; }
  .settings-card.span-2 { grid-column: span 1; }
  .settings-card h3 { font-size: 17px; }
  .settings-members-grid { grid-template-columns: 1fr; }
  .settings-entry-card { padding: 18px 16px; gap: 12px; }
  .settings-entry-icon { font-size: 26px; }
  .settings-entry-info h3 { font-size: 16px; }
  .settings-sub-header { gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
  .settings-sub-header h2 { font-size: 18px; }
  .monitor-col-name { width: 140px; font-size: 13px; }
  .monitor-col-desc { font-size: 11px; }
  .monitor-col-status { width: 40px; }
  .monitor-today-bar { flex-direction: column; gap: 12px; }
  .monitor-legend { flex-wrap: wrap; gap: 12px; }
  .webhook-url-box { flex-direction: column; align-items: stretch; }
  .webhook-url-box code { font-size: 11px; }
  .json-example { font-size: 11px; padding: 10px 12px; }

  /* -- Modals: full screen on mobile -- */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    animation: slideUp 0.3s var(--ease) both;
  }
  .modal-large { max-width: 100%; }
  .modal-header { padding: 16px 18px; }
  .modal-header h3 { font-size: 16px; }
  .modal-body { padding: 18px; }
  .modal-footer { padding: 14px 18px; }

  .detail-header-left { gap: 8px; }
  .detail-header-left h3 { font-size: 15px; }
  .detail-header-right { gap: 4px; }
  .detail-info-grid { grid-template-columns: 1fr; font-size: 13px; }

  /* -- Pipeline stages in detail -- */
  .pipeline-stage { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .stage-indicator { gap: 6px; }
  .stage-icon { font-size: 15px; }
  .stage-label { font-size: 13px; }
  .stage-select { min-width: 0; width: 100%; font-size: 12px; }

  /* -- Comment input -- */
  .comment-input { flex-wrap: wrap; }
  .comment-author-tag { font-size: 12px; padding: 4px 10px; }

  /* -- Assignment form in create modal -- */
  .assignment-row { flex-wrap: wrap; }
  .assignment-role-label { width: auto; font-size: 12px; }
  .assignment-row select { font-size: 12px; }

  /* -- Form inputs -- */
  .form-group input, .form-group select, .form-group textarea { font-size: 14px; }

  /* -- Login page -- */
  .login-card { padding: 32px 24px; }
  .login-logo { font-size: 26px; }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ═══════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--caramel);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: var(--mocha); }

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-card { animation: fadeUp 0.35s var(--ease) both; }
.project-card:nth-child(2) { animation-delay: 0.04s; }
.project-card:nth-child(3) { animation-delay: 0.08s; }
.project-card:nth-child(4) { animation-delay: 0.12s; }
.project-card:nth-child(5) { animation-delay: 0.16s; }

.modal { animation: scaleIn 0.25s var(--ease) both; }

.stat-card { animation: fadeUp 0.4s var(--ease) both; }
.stat-card:nth-child(2) { animation-delay: 0.06s; }
.stat-card:nth-child(3) { animation-delay: 0.12s; }
.stat-card:nth-child(4) { animation-delay: 0.18s; }
.stat-card:nth-child(5) { animation-delay: 0.24s; }
.stat-card:nth-child(6) { animation-delay: 0.30s; }

.kanban-column { animation: fadeUp 0.4s var(--ease) both; }
.kanban-column:nth-child(2) { animation-delay: 0.04s; }
.kanban-column:nth-child(3) { animation-delay: 0.08s; }
.kanban-column:nth-child(4) { animation-delay: 0.12s; }
.kanban-column:nth-child(5) { animation-delay: 0.16s; }
.kanban-column:nth-child(6) { animation-delay: 0.20s; }

.member-card { animation: fadeUp 0.35s var(--ease) both; }
.member-card:nth-child(2) { animation-delay: 0.05s; }
.member-card:nth-child(3) { animation-delay: 0.10s; }
.member-card:nth-child(4) { animation-delay: 0.15s; }

.modal-overlay { animation: fadeIn 0.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════
   DRAG STATES
   ═══════════════════════════════════════ */
.column-body.drag-over {
  background: rgba(156,123,92,0.06);
  border-radius: var(--r-md);
  outline: 2px dashed var(--caramel);
  outline-offset: -4px;
}

/* ═══════════════════════════════════════
   SELECTION & FOCUS
   ═══════════════════════════════════════ */
::selection {
  background: var(--accent-light);
  color: var(--dark-roast);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════
   UPDATE NOTIFICATION
   ═══════════════════════════════════════ */
.update-notice {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--dark-roast);
  color: var(--cream);
  padding: 12px 20px 12px 16px;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  animation: noticeSlideDown 0.4s var(--ease) both;
  max-width: 90vw;
  cursor: pointer;
}
.update-notice-icon { font-size: 18px; flex-shrink: 0; }
.update-notice-text { flex: 1; line-height: 1.4; }
.update-notice-close {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.update-notice-close:hover { opacity: 1; }
@keyframes noticeSlideDown {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
.notice-fade-leave-active {
  transition: all 0.3s var(--ease);
}
.notice-fade-leave-to {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}

/* ═══════════════════════════════════════
   ARCHIVE
   ═══════════════════════════════════════ */
.archive-entry {
  padding: 10px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
  border-top: 1px dashed var(--border-light);
  margin-top: 8px;
  transition: all 0.2s var(--ease);
}
.archive-entry:hover {
  color: var(--accent);
  background: var(--accent-light);
}

.archived-list { display: flex; flex-direction: column; gap: 8px; }
.archived-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-column);
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
}
.archived-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.archived-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.archived-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  flex-wrap: wrap;
}
.archived-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.review-badge {
  background: var(--clr-green);
  color: white;
  padding: 1px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   REVIEW
   ═══════════════════════════════════════ */
.review-section {
  background: var(--bg-column);
  border-radius: var(--r-md);
  padding: 18px;
  border: 1px solid var(--border-light);
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.review-header h4 { margin: 0; }
.review-content { display: flex; flex-direction: column; gap: 12px; }
.review-block {
  background: var(--bg-surface);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  border: 1px solid var(--border-light);
}
.review-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.review-text {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.review-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.review-empty {
  color: var(--text-hint);
  font-size: 13px;
  text-align: center;
  padding: 14px;
}
.review-rating {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}
.star {
  font-size: 20px;
  color: var(--caramel);
  transition: color 0.15s;
}
.star.filled {
  color: #E8A838;
}

/* Rating input */
.rating-input {
  display: flex;
  align-items: center;
  gap: 4px;
}
.star-btn {
  font-size: 28px;
  color: var(--caramel);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1;
}
.star-btn:hover, .star-btn.filled {
  color: #E8A838;
  transform: scale(1.1);
}
.rating-text {
  margin-left: 10px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ═══════════════════════════════════════
   KNOWLEDGE BASE
   ═══════════════════════════════════════ */
.knowledge-view { padding: 24px 32px; }
.knowledge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.knowledge-header h2 { font-size: 20px; }
.knowledge-header-actions { display: flex; gap: 8px; }
.knowledge-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.knowledge-filters select {
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.knowledge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.knowledge-card:hover {
  border-color: var(--mocha);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.knowledge-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.knowledge-source {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
}
.source-review { background: var(--clr-green); color: white; }
.source-manual { background: var(--clr-blue); color: white; }
.source-meeting { background: var(--clr-purple); color: white; }
.knowledge-category {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-light);
  padding: 2px 10px;
  border-radius: 100px;
}
.knowledge-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}
.knowledge-card-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.knowledge-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.knowledge-tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 100px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-weight: 500;
}
.knowledge-tag.removable { cursor: pointer; }
.knowledge-tag.removable:hover { background: var(--clr-urgent); color: white; border-color: var(--clr-urgent); }
.knowledge-card-footer {
  margin-top: auto;
  padding-top: 6px;
}
.knowledge-time {
  font-size: 12px;
  color: var(--text-hint);
}
.knowledge-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.knowledge-empty .empty-icon { font-size: 48px; margin-bottom: 12px; }
.knowledge-empty p { font-size: 15px; }
.knowledge-empty .empty-sub { font-size: 13px; color: var(--text-hint); margin-top: 6px; }

/* Knowledge Detail */
.knowledge-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.knowledge-detail-block {
  background: var(--bg-column);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
}
.knowledge-detail-block h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}
.knowledge-detail-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
}
.knowledge-detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ═══════════════════════════════════════════
   Series Group (Kanban Column Collapse)
   ═══════════════════════════════════════════ */
.series-group {
  margin-bottom: 6px;
}
.series-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.series-group-header:hover {
  background: var(--bg-hover);
  box-shadow: var(--shadow-sm);
}
.series-group-accent {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  flex-shrink: 0;
}
.series-group-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.series-group-count {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  min-width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 10px;
  flex-shrink: 0;
}
.series-group-priorities {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}
.mini-priority {
  width: 7px !important;
  height: 7px !important;
}
.series-group-chevron {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.series-group-chevron.expanded {
  transform: rotate(90deg);
}
.series-batch-summary {
  font-size: 11px;
  font-weight: 600;
  color: var(--clr-green);
  background: rgba(106, 158, 120, 0.1);
  padding: 1px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
/* Grouped cards have left accent border instead of series tag */
.project-card-grouped {
  border-left: 3px solid var(--border);
  margin-left: 6px;
  border-radius: 8px;
}
.series-group .project-card-grouped {
  margin-top: 6px;
}
.series-group .project-card-grouped:first-of-type {
  margin-top: 8px;
}

@media (max-width: 768px) {
  .series-group-header {
    padding: 8px 10px;
  }
  .series-group-name {
    font-size: 12px;
  }
  .series-group-priorities {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   Help Center
   ═══════════════════════════════════════════ */
.help-view {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 100px;
}
.help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.help-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.help-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 24px;
}
.help-tabs button {
  padding: 10px 20px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.help-tabs button:hover {
  color: var(--text-secondary);
}
.help-tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}
.help-content {
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Changelog */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.changelog-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
  transition: box-shadow 0.2s;
}
.changelog-item:hover {
  box-shadow: var(--shadow-md);
}
.changelog-latest {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-surface), var(--accent-light));
}
.changelog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.changelog-version {
  font-family: 'DM Serif Display', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 10px;
  border-radius: 6px;
}
.changelog-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.changelog-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}
.changelog-badge {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--clr-green);
  padding: 2px 8px;
  border-radius: 10px;
}
.changelog-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.changelog-items li {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}
.changelog-items li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-weight: 700;
}

/* Tutorial */
.tutorial-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.tutorial-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.tutorial-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.tutorial-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.tutorial-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}
.tutorial-card p:last-child {
  margin-bottom: 0;
}
.tutorial-card ul {
  padding-left: 20px;
  margin: 8px 0 0;
}
.tutorial-card ul li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}

/* Feedback */
.feedback-form-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.feedback-form-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.feedback-list-section h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feedback-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px 20px;
  transition: box-shadow 0.2s;
}
.feedback-item:hover {
  box-shadow: var(--shadow-sm);
}
.feedback-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.feedback-type {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-inset);
  color: var(--text-secondary);
}
.feedback-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.fb-status-pending {
  background: var(--clr-medium);
  color: #fff;
}
.fb-status-replied {
  background: var(--clr-blue);
  color: #fff;
}
.fb-status-resolved {
  background: var(--clr-green);
  color: #fff;
}
.feedback-author {
  font-size: 12px;
  color: var(--text-muted);
}
.feedback-time {
  font-size: 12px;
  color: var(--text-hint);
  margin-left: auto;
}
.feedback-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.feedback-item-content {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}
.feedback-reply {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.feedback-reply-label {
  font-weight: 600;
  color: var(--accent);
}
.feedback-admin-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

/* Mobile adjustments for help center */
@media (max-width: 768px) {
  .help-view {
    padding: 16px 12px 100px;
  }
  .help-tabs button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .changelog-item {
    padding: 14px 16px;
  }
  .changelog-header {
    gap: 8px;
  }
  .changelog-date {
    margin-left: 0;
  }
  .tutorial-card {
    padding: 12px 14px;
  }
  .feedback-form-section {
    padding: 14px 16px;
  }
  .feedback-item {
    padding: 12px 14px;
  }
}

/* Tag input */
.tag-input-row {
  display: flex;
  gap: 6px;
}
.tag-list {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ═══════════════════════════════════════
   BATCH PROGRESS — Card mini bar
   ═══════════════════════════════════════ */
.batch-progress-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 8px;
  background: var(--bg-inset);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.batch-tag {
  background: var(--accent);
  color: #fff;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.batch-stage-dot {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  opacity: 0.45;
  font-size: 11px;
  transition: opacity 0.2s;
}
.batch-stage-dot.highlight {
  opacity: 1;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   BATCH PROGRESS — Detail modal section
   ═══════════════════════════════════════ */
.batch-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.batch-total-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.batch-detail-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.batch-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-inset);
  border-radius: 8px;
}
.batch-detail-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.batch-detail-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  width: 48px;
  flex-shrink: 0;
}
.batch-detail-bar {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}
.batch-detail-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.batch-detail-input {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.batch-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
  line-height: 1;
}
.batch-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.batch-btn:active {
  transform: scale(0.92);
}
.batch-detail-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 18px;
  text-align: center;
}
.batch-detail-total {
  font-size: 12px;
  color: var(--text-muted);
}
.batch-done-row {
  background: rgba(106, 158, 120, 0.08);
  border: 1px dashed rgba(106, 158, 120, 0.3);
}
.batch-done-auto {
  font-size: 10px;
  color: var(--clr-green);
  background: rgba(106, 158, 120, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* ═══════════════════════════════════════
   BATCH PROGRESS — Mobile
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .batch-progress-bar {
    gap: 4px;
    padding: 3px 6px;
    font-size: 10px;
  }
  .batch-detail-row {
    padding: 5px 8px;
    gap: 6px;
  }
  .batch-detail-label {
    width: 40px;
    font-size: 12px;
  }
  .batch-btn {
    width: 28px;
    height: 28px;
  }
}

/* ═══════════════════════════════════════
   KNOWLEDGE - MOBILE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .knowledge-view { padding: 16px; }
  .knowledge-grid { grid-template-columns: 1fr; }
  .knowledge-filters { flex-direction: column; align-items: stretch; }
  .knowledge-filters .search-box { max-width: 100% !important; }
}
