/* Lína — files: call sheet attachments, who gets them, and Account → Files */

/* Type badge */
.pf-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 38px;
  height: 18px;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pf-kind-pdf { color: #e57373; border-color: rgba(229, 115, 115, 0.35); }
.pf-kind-doc, .pf-kind-docx, .pf-kind-rtf { color: #64b5f6; border-color: rgba(100, 181, 246, 0.35); }
.pf-kind-xls, .pf-kind-xlsx, .pf-kind-csv { color: #81c784; border-color: rgba(129, 199, 132, 0.35); }
.pf-kind-jpg, .pf-kind-png, .pf-kind-webp, .pf-kind-heic, .pf-kind-img { color: #ba68c8; border-color: rgba(186, 104, 200, 0.35); }
.pf-kind-draft { color: var(--accent); border-color: rgba(209, 139, 60, 0.35); }

/* ---------- Call sheet: Attachments ---------- */
.cs-attach-actions { margin-left: auto; display: flex; gap: 6px; }
.cs-attach-body { padding: 10px 16px 14px; }
.cs-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.cs-attach-row:last-of-type { border-bottom: none; }
.cs-attach-name {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.cs-attach-name:hover { color: var(--accent); text-decoration: underline; }
.cs-attach-size { flex-shrink: 0; color: var(--text-secondary); font-size: 11px; }
.cs-attach-audience {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  max-width: 45%;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
}
.cs-attach-audience:hover:not(:disabled) { border-color: var(--accent); }
.cs-attach-audience:disabled { cursor: default; opacity: 0.8; }
.cs-attach-audience-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-attach-caret { color: var(--text-secondary); font-size: 9px; }
.cs-attach-audience-static { cursor: default; color: var(--text-secondary); border-style: dashed; }
.cs-attach-remove { flex-shrink: 0; width: 24px; height: 24px; font-size: 15px; line-height: 1; }
.cs-attach-sub {
  margin: 12px 0 2px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.cs-attach-empty { padding: 6px 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.cs-attach-note { margin-top: 10px; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }

/* Who gets what on this send */
.cs-send-preview:empty { display: none; }
.cs-send-preview { margin: 4px 0 12px; font-size: 12px; color: var(--text-secondary); }
.cs-send-preview-details summary { cursor: pointer; }
.cs-send-preview-show { color: var(--accent); }
.cs-send-preview-list {
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.cs-send-preview-row { display: flex; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.cs-send-preview-row:last-child { border-bottom: none; }
.cs-send-preview-who { flex: 0 0 38%; min-width: 0; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-send-preview-files { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Tracking: each person's files */
.cs-tracking-item-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.cs-tracking-file {
  padding: 0 6px;
  border-radius: 3px;
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 16px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cs-tracking-file.downloaded { color: #4caf50; }

/* Pick files / list files */
.cs-pick-list, .dl-files {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
}
.cs-pick-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; cursor: pointer; min-width: 0; }
.cs-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-files-empty { padding: 10px 2px; color: var(--text-secondary); font-size: 12px; }

/* Audience picker */
.cs-aud-mode { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.cs-aud-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 10px 0 0 22px;
}
.cs-aud-group-people { grid-column: 1 / -1; }
.cs-aud-group-title {
  margin-bottom: 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.cs-aud-opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: 13px; min-width: 0; }
.cs-aud-opt[hidden] { display: none; }
.cs-aud-count { margin-left: auto; color: var(--text-secondary); font-size: 11px; }
.cs-aud-none { color: var(--text-secondary); font-size: 12px; }
.cs-aud-search { width: 100%; margin-bottom: 6px; }
.cs-aud-people { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }
.cs-aud-person { flex-shrink: 0; }
.cs-aud-role { flex: 1; min-width: 0; color: var(--text-secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-aud-hint { margin-top: 12px; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }

@media (max-width: 640px) {
  .cs-aud-groups { grid-template-columns: 1fr; margin-left: 0; }
  .cs-attach-row { flex-wrap: wrap; }
  .cs-attach-name { flex-basis: calc(100% - 110px); }
  .cs-attach-audience { max-width: none; }
  .cs-attach-section .cs-section-header { flex-wrap: wrap; }
}

/* ---------- Account → Files ---------- */
.fm-meter { margin-bottom: 14px; }
.fm-meter-text { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.fm-meter-text strong { color: var(--text-primary); }
.fm-meter-bar { height: 6px; border-radius: 3px; background: var(--bg-primary); overflow: hidden; }
.fm-meter-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.fm-meter-fill.fm-meter-full { background: #e74c3c; }
.fm-empty { padding: 10px 0; color: var(--text-secondary); font-size: 13px; }

.fm-project { border: 1px solid var(--border); border-radius: 6px; margin-bottom: 8px; overflow: hidden; }
.fm-project-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.fm-caret { display: inline-block; color: var(--text-secondary); font-size: 10px; transition: transform 0.15s ease; }
.fm-project.open .fm-caret { transform: rotate(90deg); }
.fm-project-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-project-size, .fm-section-size { color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.fm-project-body { display: none; padding: 4px 12px 10px; }
.fm-project.open .fm-project-body { display: block; }

.fm-section { margin-top: 8px; }
.fm-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.fm-section-icon { display: inline-flex; width: 13px; height: 13px; }
.fm-section-icon svg { width: 13px; height: 13px; }
.fm-section-size { margin-left: auto; text-transform: none; letter-spacing: 0; }

.fm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  min-width: 0;
}
.fm-item-main { flex: 1; min-width: 0; }
.fm-item-name { font-size: 13px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-item-count { color: var(--text-secondary); font-size: 11px; }
.fm-item-detail { font-size: 11px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-item-size { flex-shrink: 0; width: 64px; text-align: right; font-size: 11px; color: var(--text-secondary); }
.fm-item-actions { flex-shrink: 0; display: flex; gap: 4px; }

.fm-impact { margin: 6px 0 0 18px; line-height: 1.5; }
.fm-impact li { margin-bottom: 4px; }
.fm-impact-lead { margin-bottom: 2px; }
.fm-impact-final { margin-top: 10px; color: var(--text-secondary); font-size: 12px; }
.fm-blocked {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
  font-size: 13px;
}
.fm-label { display: block; margin-bottom: 4px; font-size: 12px; color: var(--text-secondary); }
.fm-rename { display: flex; align-items: center; gap: 6px; }
.fm-rename .form-input { flex: 1; }
.fm-rename-ext { color: var(--text-secondary); font-size: 13px; }

@media (max-width: 640px) {
  .fm-item { flex-wrap: wrap; }
  .fm-item-main { flex-basis: calc(100% - 120px); }
  .fm-item-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}

/* Select all / None / a group, above a list of checkboxes (S19) */
.cs-select-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; font-size: 12px; }
.cs-select-link { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; cursor: pointer; }
.cs-select-link:hover, .cs-select-link:focus-visible { text-decoration: underline; }
.cs-select-sep { color: var(--text-secondary); }
.cs-select-group { font: inherit; font-size: 12px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-primary); }
.cs-select-count { margin-left: auto; color: var(--text-secondary); }
