/* File Manager - Toolbar */
.fm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.fm-toolbar-left,
.fm-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

/* Breadcrumb */
.fm-breadcrumb {
  padding: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.fm-breadcrumb .breadcrumb {
  font-size: 0.875rem;
  margin: 0;
}

/* Content Area */
.fm-content {
  padding: 1rem;
}

/* Grid View */
.fm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.fm-grid-item {
  position: relative;
  padding: 1rem 0.75rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}

.fm-grid-item:hover {
  border-color: #0d6efd;
  background: #f8f9ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fm-file-icon {
  margin-bottom: 0.5rem;
}

.fm-file-name {
  font-size: 0.8125rem;
  font-weight: 500;
  word-break: break-word;
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
}

.fm-file-meta {
  margin-top: 0.25rem;
}

.fm-file-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.fm-grid-item:hover .fm-file-actions {
  opacity: 1;
}

.fm-file-actions .btn-link {
  color: #6c757d;
  padding: 2px 6px;
}

/* List/Table View */
.fm-table {
  margin: 0;
}

.fm-table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #dee2e6;
  padding: 0.6rem 1rem;
  white-space: nowrap;
}

.fm-table td {
  vertical-align: middle;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.fm-table-row {
  cursor: pointer;
}

.fm-table-row:hover {
  background: #f8f9ff !important;
}

/* Sortable column headers */
.sortable {
  cursor: pointer;
  position: relative;
  padding-right: 24px !important;
  user-select: none;
}

.sortable:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sortable::after {
  content: '\f0dc';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 8px;
  opacity: 0.3;
}

.sortable.asc::after {
  content: '\f0de';
  opacity: 1;
}

.sortable.desc::after {
  content: '\f0dd';
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .fm-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .fm-toolbar {
    padding: 0.5rem 0.75rem;
  }

  .fm-content {
    padding: 0.75rem;
  }
}
