/* Sales › Documents (HUB-419, 13 Nov design documents.php): the design's .doc-* page, on the
   CRM's tokens so it follows light and dark themes. */
.doc-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  min-width: 0;
}
.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.doc-header__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.doc-crumb {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--brand);
  cursor: pointer;
}
.doc-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.doc-header__usage {
  color: var(--text-muted);
  font-size: 14px;
}
.doc-btn-pill {
  border-radius: 8px;
}
.doc-note {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.doc-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.doc-search-wrap {
  position: relative;
  display: block;
  width: 260px;
  max-width: 100%;
}
.doc-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.doc-search-input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.doc-dropdown-wrap {
  position: relative;
}
.doc-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.doc-owner-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 260px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.doc-owner-menu button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.doc-owner-menu button:hover,
.doc-owner-menu button[aria-selected='true'] {
  background: var(--surface-2);
}
.doc-owner-menu__count,
.doc-muted {
  color: var(--text-muted);
  font-size: 13px;
}
.doc-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow-x: auto;
}
.doc-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 14px;
}
.doc-table th {
  height: 52px;
  padding: 0 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.doc-table td {
  height: 64px;
  padding: 0 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.doc-table tbody tr:last-child td {
  border-bottom: 0;
}
.doc-check {
  width: 44px;
}
.doc-num {
  text-align: center !important;
}
.doc-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-align: left;
}
button.doc-name {
  cursor: pointer;
}
button.doc-name:hover {
  color: var(--brand);
}
.doc-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
  border-radius: 3px;
  background: var(--text-muted);
}
.doc-icon--pdf {
  background: #e5484d;
}
.doc-icon--word {
  background: #3b6fe0;
}
.doc-icon--slides {
  background: #e8833a;
}
.doc-icon--excel {
  background: #1d7a3a;
}
.doc-icon--folder {
  width: 22px;
  height: 16px;
  background: #f0b429;
  border-radius: 2px 4px 3px 3px;
}
.doc-actions {
  text-align: right;
}
.doc-actions .link + .link {
  margin-left: 14px;
}
.doc-empty {
  padding: 32px 16px !important;
  height: auto !important;
  text-align: center;
  color: var(--text-muted) !important;
  white-space: normal !important;
}
.doc-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.doc-pager button {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.doc-pager button.is-current {
  border-color: var(--border-strong, var(--border));
}
.doc-pager button:disabled {
  color: var(--text-muted);
  cursor: default;
}
@media (max-width: 700px) {
  .doc-page {
    padding: 16px;
  }
  .doc-search-wrap {
    width: 100%;
  }
}

/* Documents dialogs. */
.doc-actions{white-space:nowrap}
.doc-error{margin:8px 0 0;color:var(--danger);font-size:13px}
.doc-link-row{display:flex;gap:8px;align-items:center}
.doc-link-row .input{flex:1;min-width:0}
.doc-results{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:4px;max-height:260px;overflow-y:auto}
.doc-results button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;text-align:left;cursor:pointer}
.doc-results button:hover{border-color:var(--brand)}

/* 17 Nov design: the row's Preview and Actions show on hover, beside the name. */
.doc-name-cell{position:relative;width:40%;min-width:320px}
.doc-name-cell .doc-name{max-width:100%}
.doc-name__text{overflow:hidden;text-overflow:ellipsis}
.doc-folder-count{margin-left:16px}
.doc-row-tools{display:none;position:absolute;top:50%;right:12px;transform:translateY(-50%);gap:8px;padding-left:12px;background:inherit}
.doc-table tbody tr:hover .doc-row-tools,
.doc-table tbody tr:focus-within .doc-row-tools{display:inline-flex}
.doc-table tbody tr:hover td{background:var(--surface-2)}
.doc-menu{padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:0 8px 24px rgb(0 0 0 / .24)}
.doc-menu__item{display:block;width:100%;min-width:180px;padding:8px 12px;border:0;border-radius:6px;background:none;color:var(--text);font:inherit;text-align:left;cursor:pointer}
.doc-menu__item:hover,.doc-menu__item:focus-visible{background:var(--surface-2)}

