/* Miller columns view */
.miller-view { display: flex; flex-direction: column; gap: 12px; }

.mv-breadcrumb {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 12.5px;
  flex-wrap: wrap;
}
.mv-crumb {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: transparent; border: 0;
  border-radius: 5px;
  font-size: 12.5px; color: #64748B;
  cursor: pointer; transition: all 0.12s;
  white-space: nowrap; flex-shrink: 0;
}
.mv-crumb:hover { background: var(--c-primary-50); color: var(--c-primary); }
.mv-crumb.current { color: var(--c-text-1); font-weight: 600; }
.mv-crumb.root { color: var(--c-text-1); font-weight: 500; }
.mv-hint { font-size: 11.5px; color: #94A3B8; flex-shrink: 0; }

.mv-shell {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mv-scroller {
  display: flex;
  overflow-x: auto;
  height: calc(100vh - 200px);
  min-height: 520px;
  scroll-behavior: smooth;
}

.mc-col {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--c-border);
  display: flex; flex-direction: column;
  background: #FAFBFC;
}
.mc-col:last-child { border-right: 0; }
.mc-col:nth-child(odd) { background: #fff; }
.mc-detail-col {
  width: 460px;
  background: linear-gradient(180deg, #fff, #FAFBFC) !important;
}

.mc-col-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  flex-shrink: 0;
}
.mc-col-head.detail { background: var(--c-primary-50); }
.mc-col-title {
  font-size: 12px; font-weight: 600;
  color: #475569;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.mc-col-count {
  font-size: 11px;
  padding: 0 6px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 999px;
  font-weight: 500;
}
.mc-add-btn { color: var(--c-primary); }
.mc-add-btn:hover { background: var(--c-primary-50); }

.mc-col-body {
  flex: 1; overflow-y: auto;
  padding: 4px 6px;
}
.mc-empty { padding: 24px; text-align: center; font-size: 12px; }

.mc-item {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--c-text-1);
  margin-bottom: 1px;
  transition: background 0.1s;
  user-select: none;
  position: relative;
}
.mc-item:hover { background: rgba(37,99,235,0.06); }
.mc-item.selected { background: var(--c-primary); color: #fff; }
.mc-item.selected .mc-meta, .mc-item.selected .mc-icon { color: #fff !important; background: rgba(255,255,255,0.18); }
.mc-item.selected .mc-icon { background: transparent; }
.mc-icon { display: flex; width: 16px; align-items: center; justify-content: center; flex-shrink: 0; }
.mc-icon.kind-sales { color: #DB2777; }
.mc-icon.kind-category { color: #2563EB; }
.mc-icon.kind-empty { color: #94A3B8; }
.mc-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-meta {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: #FCE7F3;
  color: #BE185D;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.mc-meta.cat { background: #EFF6FF; color: #1D4ED8; }
.mc-row-action {
  width: 22px; height: 22px;
  color: #94A3B8;
}
.mc-item.selected .mc-row-action { color: rgba(255,255,255,0.85); }
.mc-item.selected .mc-row-action:hover { background: rgba(255,255,255,0.2); }
.mc-rename {
  flex: 1;
  height: 24px; padding: 0 6px;
  font-size: 13px; font-family: inherit;
  border: 1px solid var(--c-primary);
  border-radius: 4px; outline: none;
  box-shadow: 0 0 0 2px rgba(37,99,235,0.12);
}

.mc-add-row {
  display: flex; align-items: center; gap: 6px;
  margin: 4px 8px 8px;
  padding: 6px 10px;
  background: transparent;
  border: 1px dashed var(--c-border-strong);
  border-radius: 6px;
  font-size: 12px;
  color: #64748B;
  cursor: pointer;
  flex-shrink: 0;
}
.mc-add-row:hover { border-color: var(--c-primary); border-style: solid; color: var(--c-primary); background: var(--c-primary-50); }

/* Detail column */
.mc-detail-body { flex: 1; overflow-y: auto; padding: 16px; }

.mc-decision { padding: 24px 12px; display: flex; flex-direction: column; gap: 10px; }
.mc-decision-title { font-size: 15px; font-weight: 600; }
.mc-decision-sub { font-size: 12.5px; color: #64748B; margin-bottom: 8px; }
.mc-decision-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1.5px solid var(--c-border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s;
}
.mc-decision-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); }
.mc-decision-card.cat { color: #1D4ED8; }
.mc-decision-card.sales { color: #BE185D; }
.mc-decision-card > div { flex: 1; }
.mc-dc-title { font-size: 13.5px; font-weight: 600; color: var(--c-text-1); margin-bottom: 2px; }
.mc-dc-desc { font-size: 12px; color: #64748B; }

.mc-meta-bar {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  margin-bottom: 14px; padding: 8px 10px;
  background: #F8FAFC;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.mc-meta-bar-label { font-size: 11px; color: #94A3B8; font-weight: 600; letter-spacing: 0.04em; margin-right: 4px; }
.mc-meta-sel {
  height: 26px; padding: 0 22px 0 8px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 5px;
  font-size: 12px;
  color: var(--c-text-1);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  cursor: pointer;
}

.mc-sales-list { display: flex; flex-direction: column; gap: 8px; }
.mc-sc {
  display: flex; gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  align-items: center;
  cursor: pointer;
  transition: all 0.14s;
}
.mc-sc:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mc-sc.unlisted { background: #FAFBFC; opacity: 0.85; }
.mc-sc-main { flex: 1; min-width: 0; }
.mc-sc-name { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-sc-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.mc-sc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: #64748B; }
.mc-sc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.mc-sc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.mc-sales-add {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px;
  background: transparent;
  border: 1.5px dashed var(--c-border-strong);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--c-primary);
  cursor: pointer;
}
.mc-sales-add:hover { border-color: var(--c-primary); border-style: solid; background: var(--c-primary-50); }
