/* ==========================================================================
   Shared page components: toolbar, table, form grid, kanban, detail,
   settings. Material style — shadow elevation instead of borders.
   ========================================================================== */

.crumb {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.crumb a { color: var(--text-muted); }
.crumb .sep { margin: 0 4px; }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 10px;
  padding: 8px 12px;
}

.filter-chip svg { width: 13px; height: 13px; color: var(--text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 11px;
  padding: 9px 15px;
  border: none;
  background: var(--card);
  box-shadow: var(--shadow-card);
  color: var(--text-main);
  cursor: pointer;
}

.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,107,255,0.32);
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

/* ---------- Table ---------- */

.table-panel {
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  overflow: hidden;
}

table.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fafafe;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafe; }

.cell-main { font-weight: 600; }
.cell-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.tag-gold { background: var(--gold-soft); color: #3448c9; }
.tag-sage { background: var(--sage-soft); color: #16833f; }
.tag-rust { background: var(--rust-soft); color: #c62828; }
.tag-slate { background: var(--slate-soft); color: #6d3fd6; }

.row-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sage-soft);
  color: #16833f;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 9px;
  vertical-align: middle;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Form ---------- */

.form-panel {
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  padding: 22px 26px 26px;
  max-width: 760px;
}

.form-section { margin-bottom: 22px; }
.form-section:last-child { margin-bottom: 0; }

.form-section h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 4px;
}

.form-section .form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

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

.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }

.field label { font-size: 12px; font-weight: 600; color: var(--text-main); }

.field input, .field select, .field textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  background: #fbfbfe;
  color: var(--text-main);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}

.field textarea { resize: vertical; min-height: 80px; }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- Kanban ---------- */

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 236px;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.kanban-col {
  background: #f8f8fc;
  border: none;
  border-radius: 14px;
  padding: 12px;
}

.kanban-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kanban-col-head .kc-title { font-size: 12.5px; font-weight: 700; }

.kanban-col-head .kc-count {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10.5px;
  color: var(--gold);
  background: var(--card);
  box-shadow: var(--shadow-card);
  border-radius: 999px;
  padding: 2px 8px;
}

.kanban-card {
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 11px;
  padding: 10px 11px;
  margin-bottom: 8px;
}

.kanban-card .kc-name { font-size: 12.5px; font-weight: 600; }
.kanban-card .kc-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Detail / profile ---------- */

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.detail-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.detail-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.detail-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.detail-tags { display: flex; gap: 6px; margin-top: 8px; }

.info-panel {
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 16px;
  padding: 18px 20px 20px;
  margin-bottom: 16px;
}

.info-panel h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.info-row:last-child { border-bottom: none; }
.info-row .info-label { color: var(--text-muted); }
.info-row .info-value { font-weight: 600; }

.timeline-track { position: relative; padding-left: 20px; }

.timeline-step {
  position: relative;
  padding-bottom: 18px;
}

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

.timeline-step::before {
  content: "";
  position: absolute;
  left: -20px; top: 2px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-step.done::before { background: var(--sage); }
.timeline-step.pending::before { background: var(--text-muted); }

.timeline-step::after {
  content: "";
  position: absolute;
  left: -16px; top: 12px;
  bottom: -6px;
  width: 1px;
  background: var(--line);
}

.timeline-step:last-child::after { display: none; }

.timeline-step .ts-title { font-size: 13px; font-weight: 600; }
.timeline-step .ts-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Settings ---------- */

.settings-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.settings-tab {
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}

.settings-tab.active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--gold);
}

/* ---------- Sitemap index ---------- */

.sitemap-group { margin-bottom: 26px; }

.sitemap-group h2 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
}

.sitemap-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.sitemap-links a {
  display: block;
  background: var(--card);
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main);
}

.sitemap-links a:hover { box-shadow: var(--shadow-pop); }

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