/* Imports, leads and settings. Shared components live in components.css. */
/* layout.css sets the phone grid to 1fr, which grows to the widest unbreakable content (a row of tabs) and pushes the page sideways. */

/* Import: file drop zone, the chosen file, column mapping, the bar that starts it. */
.drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 38px 20px; text-align: center;
  border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); transition: border-color .12s, background .12s;
}
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { color: var(--ink-3); margin-bottom: 6px; }
.drop:hover svg, .drop.over svg { color: var(--accent); }
.drop b { font-size: 1.05rem; font-weight: 620; }
.drop span { color: var(--ink-3); }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fileinfo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.fileinfo .ico { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.fileinfo .grow b { display: block; overflow-wrap: anywhere; }
.fileopts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.fileopts summary { cursor: pointer; color: var(--ink-2); font-weight: 560; }
.fileopts .grid { margin-top: 12px; }
.maprow { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr); gap: 6px 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.maprow .src b { display: block; overflow-wrap: anywhere; }
.maprow .src small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.maprow > svg { color: var(--ink-3); }
@media (max-width: 700px) { .maprow { grid-template-columns: minmax(0, .85fr) 16px minmax(0, 1.3fr); gap: 6px 10px; } }
.maprow.skip .src { opacity: .55; }
.maprow.skip > svg { opacity: .3; }
.maphead { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-bottom: 4px; }
.choice { display: flex; flex-direction: column; gap: 2px; }
.choice .check { align-items: flex-start; }
.choice .check input { margin-top: 5px; }
.choice small { display: block; padding-left: 24px; }
.actionbar {
  position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 22px -36px -64px; padding: 14px 36px; background: var(--surface); border-top: 1px solid var(--line);
}
.actionbar .sum { flex: 1 1 18rem; min-width: 0; }
.actionbar .sum b { display: block; }
@media (max-width: 900px) { .actionbar { margin: 18px -16px -48px; padding: 12px 16px; } }
@media (max-width: 700px) {
  .actionbar { gap: 8px; padding: 10px 16px; }
  .actionbar .sum b { font-size: .92rem; }
  .actionbar .sum .calm { display: none; }
  .actionbar button.primary { width: 100%; }
}

/* Progress: a bar that fills, or slides while the total is unknown. */
.bar.big { height: 12px; border-radius: 6px; }
.bar.busy i { width: 35%; animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { from { margin-left: -35%; } to { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar.busy i { animation: none; width: 100%; opacity: .45; } }
.stat.warn b { color: var(--warn); }
.usage summary { cursor: pointer; font-weight: 600; }
.usage[open] summary { margin-bottom: 14px; }
.maplist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 4px 20px; }
.maplist li { overflow-wrap: anywhere; }
.raw { max-width: 30rem; color: var(--ink-2); font-size: .85rem; }

/* Leads. */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters select { width: auto; min-width: 9.5rem; }
.filters .search { flex: 1 1 16rem; min-width: 14rem; }
.tog[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
td .sub.late { color: var(--bad); font-weight: 600; }
.filters .more-filters { flex: 1 1 100%; }
.filters summary { cursor: pointer; color: var(--ink-2); font-weight: 560; }
.filters .grid { margin-top: 10px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lead-grid .card + .card { margin-top: 0; }
.lead-grid > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
/* On a phone the columns dissolve: stage, what to do, who, then the notes. */
@media (max-width: 900px) {
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-grid > div { display: contents; }
  .lead-grid > div:first-child > :nth-child(2) { order: 4; }
  .lead-grid > div:last-child > :first-child { order: 2; }
  .lead-grid > div:last-child > :nth-child(2) { order: 3; }
}
.pipeline { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pipeline button { height: 34px; padding: 0 14px; border-radius: 999px; color: var(--ink-2); }
.pipeline button.past { background: var(--surface-2); border-color: transparent; }
.pipeline button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pipeline button.won[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.pipeline button.lost[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.pipeline .gap { width: 1px; height: 22px; margin: 0 6px; background: var(--line-strong); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presets button { height: 26px; padding: 0 10px; font-size: .8rem; border-radius: 999px; }
.note-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 2px 0 0; }
.link-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.link-row a { overflow-wrap: anywhere; }

/* Settings. */
.items { display: flex; flex-direction: column; }
.items > div { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding: 13px 0; border-top: 1px solid var(--line); }
.items > div:first-child { border-top: 0; padding-top: 0; }
.items > div:last-child { padding-bottom: 0; }
.items b { display: block; font-weight: 580; }
.items small { display: block; max-width: 34rem; }
.items .val { font-weight: 620; font-variant-numeric: tabular-nums; }
.secret { display: flex; gap: 8px; }
.secret input { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .03em; }
.avatar-lg { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-weight: 650; font-size: 1.1rem; }
.me { display: flex; align-items: center; gap: 14px; }
.narrow { max-width: 440px; }
.form { max-width: 640px; }
.me b { display: block; font-size: 1.05rem; }
.switches { display: flex; flex-direction: column; gap: 10px; }
.switches .check { align-items: flex-start; }
.switches .check input { margin-top: 5px; }
.switches small { display: block; }
