/* The Documents page (Templates/documents.html). Uses the shared tokens from atlas.css. */
/* Dropdowns: our own chevron with room around it, instead of the browser's arrow pressed against the edge. */
.doc-page select.atlas-input{ appearance:none; -webkit-appearance:none; padding-right:38px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; background-size:14px; }
.doc-stats{ display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin:0 0 18px; }
.doc-stat{ padding:14px 16px; border-radius:var(--atlas-radius-sm, 12px); background:rgba(19,36,74,.6); border:1px solid var(--atlas-border); }
.doc-stat__value{ display:block; font-size:24px; font-weight:800; color:var(--atlas-text); }
.doc-stat__label{ font-size:12.5px; color:var(--atlas-muted); }
.doc-seg{ display:inline-flex; padding:3px; border-radius:12px; background:rgba(148,163,184,.10); border:1px solid var(--atlas-border); }
.doc-seg a{ display:inline-block; text-decoration:none; border:0; background:transparent; color:var(--atlas-text-2); font:inherit; font-size:13px; font-weight:600; padding:7px 14px; border-radius:9px; cursor:pointer; }
.doc-seg .is-on{ background:var(--atlas-primary); color:#fff; }
.doc-card{ padding:6px 6px 0; }
.doc-table td{ vertical-align:top; }
.doc-title{ color:var(--atlas-text); font-weight:600; }
.doc-meta{ margin-top:3px; font-size:12px; color:var(--atlas-muted); }
.doc-meta--error{ color:#fca5a5; max-width:220px; }
.doc-actions{ white-space:nowrap; text-align:right; }
.doc-actions .atlas-btn{ margin-left:6px; }
.doc-actions-h{ width:1%; }
.doc-status{ display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.doc-status--ready{ color:#6ee7b7; background:rgba(16,185,129,.16); }
.doc-status--indexing{ color:#93c5fd; background:rgba(59,130,246,.18); }
.doc-status--waiting{ color:var(--atlas-text-2); background:rgba(148,163,184,.16); }
.doc-status--failed{ color:#fca5a5; background:rgba(239,68,68,.16); }
.doc-status--retired{ color:var(--atlas-muted); background:rgba(148,163,184,.10); }
.doc-foot{ margin:0; padding:12px; font-size:12px; color:var(--atlas-muted); }
.doc-scrim{ position:fixed; inset:0; z-index:1000; background:rgba(3,8,20,.62); display:flex; justify-content:flex-end; }
.doc-scrim[hidden]{ display:none; }
.doc-scrim--center{ justify-content:center; align-items:center; z-index:1010; }
.doc-drawer{ width:min(560px, 100%); height:100%; overflow:auto; padding:22px; box-sizing:border-box; background:var(--atlas-surface); border-left:1px solid var(--atlas-border-strong); box-shadow:-20px 0 50px rgba(0,0,0,.4); }
.doc-drawer__head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.doc-drawer__head h2, .doc-dialog h2{ margin:0; font-size:19px; color:var(--atlas-text); }
.doc-drop{ display:flex; flex-direction:column; align-items:center; gap:6px; margin-top:6px; padding:22px; text-align:center; border-radius:12px; border:1.5px dashed var(--atlas-border-strong); background:rgba(148,163,184,.06); color:var(--atlas-text-2); font-weight:400; }
.doc-drop input[type=file]{ max-width:100%; color:var(--atlas-text-2); font:inherit; font-size:13px; }
.doc-drop i{ font-size:26px; color:var(--atlas-sky); }
.doc-opt{ font-weight:400; font-size:11.5px; color:var(--atlas-muted); }
.doc-form__actions{ display:flex; gap:10px; justify-content:flex-end; align-items:center; margin-top:6px; }
.doc-spacer{ flex:1; }
.doc-danger{ color:#fca5a5 !important; }
.doc-danger-solid{ background:#b91c1c !important; border-color:#b91c1c !important; }
.doc-error{ display:flex; gap:8px; padding:10px 12px; border-radius:10px; font-size:13px; color:#fecaca; background:rgba(239,68,68,.10); border:1px solid rgba(239,68,68,.32); }
.doc-error[hidden]{ display:none; } /* display:flex above would otherwise show it, empty, when hidden */
.doc-fileline{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 16px; padding:10px 12px; border-radius:10px; font-size:13px; color:var(--atlas-text-2); background:rgba(148,163,184,.08); }
.doc-dialog{ width:min(440px, calc(100% - 32px)); padding:22px; border-radius:16px; background:var(--atlas-surface); border:1px solid var(--atlas-border-strong); color:var(--atlas-text-2); font-size:14px; line-height:1.5; }
@media (max-width: 760px){
  .doc-stats{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .hub-form{ grid-template-columns:1fr; }
  .hub-toolbar .atlas-input{ min-width:0; width:100%; }
  .doc-table thead{ display:none; }
  .doc-table, .doc-table tbody, .doc-table tr, .doc-table td{ display:block; width:auto; }
  .doc-table tr{ padding:12px 10px; border-bottom:1px solid var(--atlas-border); }
  .doc-table td{ padding:3px 0; border:0; }
  .doc-table td[data-label]::before{ content:attr(data-label) ": "; color:var(--atlas-muted); font-size:12px; }
  .doc-table td[data-label] .doc-meta{ display:inline; margin-left:4px; }
  .doc-actions{ text-align:left; margin-top:8px; }
  .doc-actions .atlas-btn{ margin:0 6px 0 0; }
}
  
.doc-message{ display:flex; gap:8px; align-items:center; margin:0 0 14px; padding:10px 14px; border-radius:var(--atlas-radius-sm); font-size:13.5px; }
.doc-message--success{ color:#a7f3d0; background:rgba(16,185,129,.12); border:1px solid rgba(16,185,129,.32); }
.doc-message--info{ color:#bfdbfe; background:rgba(59,130,246,.12); border:1px solid rgba(59,130,246,.32); }
