/* Container */
.che-docs { max-width: 1200px; margin: 0 auto; }
/* All H3 headers - 20px */
h3,
.che-docs__title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #232222 !important;
  margin: 18px 0 10px !important;
  line-height: 1.3 !important;
}

/* All paragraphs and help text - 16px */
p,
.che-docs__help,
.che-supporting-help p,
p.content,
div.well p,
.section p {
  font-size: 16px !important;
  color: #555 !important;
  line-height: 1.5 !important;
  margin: 0 0 10px !important;
}

/* Subsection headers (if you want them slightly smaller) */
h3.che-supporting-header,
.che-docs__subtitle {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #232222 !important;
  margin: 16px 0 6px !important;
  line-height: 1.3 !important;
}

.che-docs__error {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
  padding: 10px;
  margin: 8px 0;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
}

.che-required { color: red; }

/* Buttons */
.che-btn {
  padding: 8px 14px;
  border: 1px solid #c9c9c9;
  background: #f3f3f3;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.che-btn--primary { background: #1B4F72; border-color: #1B4F72; color: #fff; }
.che-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.che-filebtn input { display: none; }
.che-filelabel { color: #555; margin-left: 8px; font-size: 14px; }

/* Dropzone */
.che-dropzone {
  border: 2px dashed #c9c9c9;
  border-radius: 4px;
  padding: 18px;
  text-align: center;
  color: #666;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.che-dropzone__row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.che-hint { font-size: 12px; color: #666; margin-top: 6px; }

/* Preview tiles */
.che-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.che-tile {
  position: relative;
  width: 100px;
  height: 120px;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #fafafa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.che-tile img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-bottom: 1px solid #e5e5e5;
}
.che-tile__icon { font-size: 40px; color: #1B4F72; padding-top: 16px; }
.che-tile__name {
  font-size: 12px;
  text-align: center;
  padding: 4px 6px;
  word-break: break-all;
  line-height: 1.2;
  color: #444;
}
.che-tile__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #d9534f;
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: bold;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  z-index: 9999; 
  padding: 0;
}

/* Review table */
/* Review table */
.che-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 20px 0 20px; /* Increased top and bottom margin */
  table-layout: fixed;
  background: transparent; 
  border: none;
  padding: 0 20px 20px;
}

.che-table th,
.che-table td {
  border: none;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 8px;
  font-size: 14px;
  text-align: left;
  background: transparent;
  vertical-align: middle;
}

.che-table th { 
  background: transparent; 
  font-weight: 700;  
  color: #333;  
  border-bottom: 1px solid #e0e0e0;
}

/* Remove bottom border from last row */
.che-table tbody tr:last-child td {
  border-bottom: none;
}

.che-table tbody tr {  
  background: transparent;  
  transition: none;
}

.che-table input[type="text"] {
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 0px;
  box-sizing: border-box;
  background: #fff;
}

.che-table input[type="text"]:focus {
  outline: none;
  border-color: #1B4F72;
  box-shadow: none;
}

.che-table td:first-child,
.che-table th:first-child {
  width: 40%;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 20px;
}

.che-table td:nth-child(2),
.che-table th:nth-child(2) {
  width: 60%;
  padding-right: 20px;
}

.crmEntityFormView .cell {
  padding: 0 0px 20px !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .che-table {
    display: block;
    overflow-x: auto; /* Allow horizontal scroll if absolutely needed */
  }
  
  .che-table th,
  .che-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* File Name column on mobile - narrower */
  .che-table td:first-child,
  .che-table th:first-child {
    width: 40%;
    max-width: 120px; /* Hard limit on mobile */
  }
  
  /* Document Description column - more space on mobile */
  .che-table td:nth-child(2),
  .che-table th:nth-child(2) {
    width: 60%;
  }

  /* ── Expenses subgrid mobile fix ─────────────────────── */
@media (max-width: 768px) {
  .table.table-striped td .input-group {
    max-width: 100% !important;
    width: 100% !important;
  }

  .table.table-striped td .input-group .pcf-amt {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  .table.table-striped {
    table-layout: fixed;
    width: 100%;
  }

  .table.table-striped td,
  .table.table-striped th {
    word-wrap: break-word;
    overflow: hidden;
  }
}

}
