/* ==================== DOCUMENTS (iCloud Drive style) ==================== */
.document-view-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}
.document-view-toggle {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  min-height: 32px;
}
.document-view-toggle:hover { background: var(--border-light); }
.document-view-toggle.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Grid view */
.document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.document-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  text-align: center;
}
.document-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  background: var(--border-light);
}
.document-item-icon {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 2px;
}
.document-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  white-space: pre-line;
  overflow-wrap: break-word;
  line-height: 1.35;
}
.document-item-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.document-item-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  gap: 4px;
}
.document-item:hover .document-item-actions {
  opacity: 1;
  pointer-events: auto;
}

/* List view */
.document-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.document-list-header {
  display: grid;
  grid-template-columns: 60px 1fr 160px 120px 140px 120px;
  gap: 10px;
  padding: 10px 14px;
  background: var(--badge-info-bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-items: center;
}
.document-list-row {
  display: grid;
  grid-template-columns: 60px 1fr 160px 120px 140px 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  background: var(--card);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.document-list-row:hover { background: var(--border-light); }
.document-list-icon {
  font-size: 24px;
  line-height: 1;
}
.document-list-name {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.document-list-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.document-list-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.document-list-row:hover .document-list-actions {
  opacity: 1;
  pointer-events: auto;
}
.document-list-actions button {
  padding: 4px 8px;
  font-size: 11px;
  min-height: auto;
}

/* Empty state */
.documents-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}
.documents-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

/* File type icon colors */
.doc-type-pdf { color: #ef4444; }
.doc-type-doc { color: #3b82f6; }
.doc-type-xls { color: #16a34a; }
.doc-type-ppt { color: #f59e0b; }
.doc-type-text { color: #6b7280; }
.doc-type-other { color: #9ca3af; }

@media (max-width: 900px) {
  .document-list-header { display: none; }
  .document-list-row {
    grid-template-columns: 50px 1fr 120px;
    gap: 8px;
    padding: 10px 14px;
  }
  .document-list-name { white-space: normal; overflow: visible; text-overflow: clip; }
  .document-list-row > *:nth-child(3) { grid-column: 1 / -1; font-size: 11px; color: var(--muted); margin-top: 4px; }
  .document-list-row > *:nth-child(4),
  .document-list-row > *:nth-child(5),
  .document-list-row > *:nth-child(6) { display: none; }
}

/* Layout trang van de: cot trai chua tom tat + thanh tim kiem, cot phai la danh sach van de */
.issue-page-layout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.issue-left-col {
  flex: 0 0 300px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.issue-summary-card {
  width: 100%;
  max-width: none;
}
.issue-left-col .card.card-dashboard {
  margin-bottom: 0;
}
.issue-list-main {
  flex: 1;
  min-width: 0;
}
@media (max-width: 900px) {
  .issue-page-layout { flex-direction: column; }
  .issue-left-col { flex: 1 1 auto; max-width: none; width: 100%; }
}
