:root {
  --bg: #f4f3ef;
  --paper: #fff;
  --ink: #1a1f2e;
  --muted: #5c6478;
  --line: #e2e4ea;
  --accent: #1e4d6b;
  --accent-soft: #e8f0f5;
  --accent-dark: #163a52;
  --warn-bg: #fff8e6;
  --warn-border: #e6c200;
  --positive: #1a6b4a;
  --negative: #9b2c2c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(26, 31, 46, 0.06);
  --nav-w: 240px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

nav.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--accent-dark);
  color: #fff;
  padding: 1.5rem 0;
}

nav.sidebar .brand {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 1rem;
}

nav.sidebar .brand h1 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

nav.sidebar .brand p {
  font-size: 0.78rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}

nav.sidebar a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.88rem;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

nav.sidebar a:hover,
nav.sidebar a.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-left-color: #7eb8d4;
}

nav.sidebar .nav-group {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  padding: 1rem 1.25rem 0.35rem;
}

nav.sidebar .sidebar-note {
  font-size: 0.78rem;
  opacity: 0.55;
  padding: 1rem 1.25rem 0;
}

main {
  padding: 1.25rem 1.75rem 3rem;
  max-width: 1060px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.assistant-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.assistant-form {
  display: flex;
  flex: 1;
  gap: 0.5rem;
}

.assistant-form input {
  flex: 1;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.assistant-form .btn-sm {
  flex-shrink: 0;
  width: auto;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.tab-bar .tab {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tab-bar .tab:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.tab-bar .tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.dashboard-block { margin-bottom: 1rem; }

.upcoming-list .task-compact,
.linked-tasks .task-compact {
  padding: 0.45rem 0.75rem;
}

.linked-tasks-wrap {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.linked-tasks-wrap h3 {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  color: var(--accent);
}

.md-content {
  font-size: 0.9rem;
  line-height: 1.6;
}

.md-content h1 { font-size: 1.15rem; margin: 0 0 0.75rem; color: var(--accent-dark); }
.md-content h2 { font-size: 1rem; margin: 1rem 0 0.5rem; }
.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.85rem;
}
.md-content th,
.md-content td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.55rem;
  text-align: left;
}
.md-content th { background: #fafafa; }
.md-content blockquote {
  margin: 0.5rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.compact-timeline .tl-item { padding-bottom: 0.85rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.4);
}

.modal-panel {
  position: relative;
  width: min(480px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-panel h3 { margin-bottom: 0.5rem; }

.assistant-summary {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.assistant-actions-preview {
  font-size: 0.78rem;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 4px 18px rgba(30, 77, 107, 0.22);
}

.hero h2 {
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.hero .lead {
  opacity: 0.92;
  font-size: 0.95rem;
  max-width: 52ch;
}

.hero .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.hero .tag {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.kpi {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow);
}

.kpi.highlight {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.kpi .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.kpi .value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.kpi .note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

section.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  scroll-margin-top: 1.5rem;
}

section.panel h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-soft);
}

section.panel h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 1.25rem 0 0.6rem;
}

p, .note {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-bottom: 0.75rem;
}

th, td {
  padding: 0.5rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
  background: #fafafa;
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

tr.total td {
  font-weight: 600;
  border-top: 2px solid var(--line);
  background: #fafafa;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.alert {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-left: 4px solid var(--warn-border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.alert strong { display: block; margin-bottom: 0.35rem; color: var(--ink); }

.alert ul { margin: 0.5rem 0 0 1.1rem; color: var(--muted); }

.pos { color: var(--positive); }
.neg { color: var(--negative); }

/* Planning */
.plan-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.progress-wrap { flex: 1; min-width: 200px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.progress-bar {
  height: 8px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3a7a9e);
  border-radius: 999px;
  transition: width 0.3s;
}

.plan-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-dark); }

.phase {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.phase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}

.phase-header h3 {
  margin: 0;
  font-size: 0.92rem;
  color: var(--accent);
}

.phase-header .phase-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.phase-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.phase-edit {
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1;
  color: var(--muted);
  border-color: transparent;
  background: transparent;
}

.phase-edit:hover {
  color: var(--accent);
  border-color: var(--line);
  background: #fff;
}

.planning-epic-toolbar {
  margin-top: 0.5rem;
  text-align: right;
}

.btn-sm {
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
}

.phase-empty {
  margin: 0.5rem 1rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.phase-body { padding: 0.25rem 0; }

.task {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
}

.task:hover { background: #fafafa; }

.task:last-child { border-bottom: none; }

.task.done .task-title { text-decoration: line-through; opacity: 0.55; }

.task input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.task-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.task-key {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
  font-family: ui-monospace, "Cascadia Code", monospace;
  flex-shrink: 0;
}

.task-title {
  font-size: 0.88rem;
  line-height: 1.35;
}

.task-preview {
  display: block;
  width: 100%;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-assignee {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  max-width: 6rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-due-badge {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
  text-align: right;
}

.task-due-badge.overdue { color: var(--negative); font-weight: 600; }
.task-due-badge.soon { color: #b8860b; }

.timeline {
  position: relative;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.tl-item {
  position: relative;
  padding-bottom: 1.25rem;
  padding-left: 1rem;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.tl-item.future::before { background: var(--line); box-shadow: none; }

.tl-item .tl-date {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tl-item .tl-title { font-weight: 600; font-size: 0.9rem; }

.tl-item .tl-desc { font-size: 0.85rem; color: var(--muted); }

footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.mobile-nav-toggle { display: none; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }

  nav.sidebar {
    position: fixed;
    left: -100%;
    z-index: 100;
    width: min(280px, 90vw);
    transition: left 0.25s;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  nav.sidebar.open { left: 0; }

  .mobile-nav-toggle {
    display: block;
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 101;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(30, 77, 107, 0.35);
  }

  main { padding: 1.25rem 1rem 5rem; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 1.5rem; }
}

@media print {
  nav.sidebar, .mobile-nav-toggle, .plan-actions { display: none; }
  .layout { display: block; }
  main { max-width: none; padding: 0; }
  section.panel { break-inside: avoid; box-shadow: none; }
}

/* —— Flask : login, assignation, dépendances —— */
.user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  margin: 0 0 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.user-bar form { margin: 0; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card {
  width: min(400px, 100%);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.login-card h1 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.login-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-error { color: var(--negative); margin-bottom: 1rem; font-size: 0.9rem; }

.login-card label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
}

.login-card .btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.login-card .btn-primary:hover { background: var(--accent-dark); }

.task.blocked { opacity: 0.72; }
.task.blocked .task-title::after {
  content: " · bloquée";
  color: var(--negative);
  font-size: 0.75rem;
  font-weight: 600;
}

.assignee-pill {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-left: 0.35rem;
  vertical-align: middle;
}

.plan-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

.plan-filters label { font-size: 0.85rem; color: var(--muted); }

.plan-filters select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.btn-danger {
  color: var(--negative);
  border-color: #e8c4c4;
  background: #fff5f5;
}

.btn-danger:hover {
  background: #ffe8e8;
  border-color: var(--negative);
}

body.drawer-open { overflow: hidden; }

.task-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: flex-end;
}

.task-drawer[hidden] { display: none; }

.task-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.35);
}

.task-drawer-panel {
  position: relative;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--paper);
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.18s ease-out;
}

@keyframes drawer-in {
  from { transform: translateX(12px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.task-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.drawer-phase {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.drawer-close {
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.45rem;
}

.task-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
}

.drawer-field > span:first-child {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.drawer-field input[type="text"],
.drawer-field input[type="month"],
.drawer-field textarea,
.drawer-field select {
  font-family: inherit;
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  background: #fff;
  color: var(--ink);
}

.drawer-field textarea { resize: vertical; min-height: 5rem; }

.drawer-field select[multiple] { min-height: 7rem; }

.drawer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.field-hint {
  font-size: 0.72rem;
  color: var(--muted);
}

.drawer-blocked {
  margin: 0;
  font-size: 0.78rem;
  color: var(--negative);
  background: #fff5f5;
  border: 1px solid #f0d0d0;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
}

.drawer-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.drawer-actions .btn-primary { width: auto; flex: 1; }

.drawer-error {
  margin: 0;
  font-size: 0.82rem;
  color: var(--negative);
}

@media (max-width: 520px) {
  .drawer-row { grid-template-columns: 1fr; }
  .task {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .task-assignee,
  .task-due-badge {
    grid-column: 2;
    text-align: left;
    max-width: none;
  }
  .pieces-grid { grid-template-columns: 1fr; }
}

.pieces-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pieces-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.pieces-subtitle {
  font-size: 0.95rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--accent-dark);
}

.pieces-status {
  font-size: 0.85rem;
  color: var(--positive);
  margin-bottom: 0.75rem;
}

.pieces-status.error { color: var(--negative); }

.rules-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.rules-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.rules-table th,
.rules-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0.45rem;
  vertical-align: top;
}

.rules-table th {
  background: #fafafa;
  font-weight: 600;
  text-align: left;
}

.rules-table input {
  width: 100%;
  min-width: 5rem;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.rules-table .rule-query input { min-width: 12rem; }

.pieces-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.pieces-folder {
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.65rem;
}

.pieces-folder summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
}

.pieces-file-list,
.pieces-mail-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.pieces-file-list li,
.pieces-mail-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

.pieces-file-list li:last-child,
.pieces-mail-list li:last-child { border-bottom: none; }

.file-name,
.mail-subject { font-weight: 600; display: block; }

.file-meta,
.mail-meta,
.mail-from {
  font-size: 0.75rem;
  color: var(--muted);
}

.file-path {
  font-size: 0.72rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}
