/* Real-tool additions for the TechCart dashboard.
   The full TechCart design system lives inline in templates/index.html (verbatim,
   order-dependent). This file only adds the styles the live upload/result flow needs,
   written with the design's own CSS variables so everything blends in. */

/* ---- Upload dropzone (the .upload box becomes a real file picker) ---- */
.upload { position: relative; }
.upload strong, .upload p { position: relative; z-index: 1; pointer-events: none; }
#file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.upload.hover {
  border-color: var(--blue2);
  background: linear-gradient(180deg, #e9f3ff, #ffffff);
}

/* ---- Picked-files list ---- */
#file-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  max-height: 170px;
  overflow: auto;
  display: grid;
  gap: 6px;
}
#file-list:empty { display: none; }
#file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 8px 12px;
  word-break: break-all;
}
#file-list li:before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--blue3);
}

/* ---- Calc button busy state ---- */
#calcBtn:disabled { cursor: progress; }

/* ---- Department chip inside the result table ---- */
#resultTable td .dept {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(44, 130, 229, .12);
  color: #155ea7;
  font-weight: 850;
  font-size: 12px;
  white-space: nowrap;
}

/* ---- Download links ---- */
.tc-downloads {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.tc-downloads a {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--white);
  font-weight: 850;
  font-size: 14px;
  transition: .15s ease;
}
.tc-downloads a:hover {
  border-color: rgba(44, 130, 229, .45);
  box-shadow: 0 10px 26px rgba(23, 42, 68, .08);
  transform: translateY(-1px);
}

/* ---- Warnings ---- */
.tc-warn {
  margin-top: 16px;
  border: 1px solid rgba(246, 198, 91, .55);
  background: rgba(246, 198, 91, .12);
  border-radius: 16px;
  padding: 14px 16px;
  color: #7a5b12;
  font-size: 13px;
  line-height: 1.5;
}
.tc-warn h4 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #8a6410;
}
.tc-warn ul { margin: 0; padding-left: 18px; }

/* ---- API cost (muted secondary block) ---- */
.api-cost {
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .6);
}
.api-cost h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 14px;
}
.api-grid > div { display: flex; flex-direction: column; }
.api-grid > div span:first-child {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.api-grid > div span:last-child { color: var(--white); font-weight: 800; font-size: 13px; }
.api-breakdown {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
  font-size: 11px;
  color: var(--muted);
}

/* ---- Error block ---- */
.tc-error {
  margin-top: 16px;
  border: 1px solid rgba(255, 93, 93, .5);
  background: rgba(255, 93, 93, .08);
  border-radius: 16px;
  padding: 14px 16px;
  color: #b22020;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.tc-error h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
