/* garante fundo até o fim da página */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.docs-page-bg {
  min-height: 100vh;
  padding: 36px 20px;
  box-sizing: border-box;
}

/* container central */
.docs-app {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  color: #1e1e1e;
  max-width: 1200px;
  margin: 0 auto;
}

/* header */
.docs-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.docs-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #14213d;
}

.docs-bc {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* painel */
.docs-panel {
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-search input {
  width: 560px;
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 24px;
  border: 1px solid #e6e9ee;
  background: #fbfcfd;
  outline: none;
  font-size: 14px;
  margin-bottom: 15px;
}

/* filtros (lado direito) */
.docs-filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter {
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #e6e9ee;
  background: #fff;
}

/* tabela card */
.docs-table-section {
  margin-bottom: 28px;
  background: transparent;
  border-radius: 8px;
  padding: 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.docs-table thead tr {
  background: #fff;
}

.docs-table th,
.docs-table td {
  padding: 14px 18px;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f4;
}

.docs-table th.col-check,
.docs-table td.col-check {
  width: 48px;
  text-align: center;
}

.docs-table th.col-name {
  width: 55%;
  font-weight: 700;
}

.docs-table tbody tr {
  transition: all 0.2s ease;
}

.docs-table tbody tr:hover {
  background: #f5f8ff;
  box-shadow: inset 0 0 0 1px #e6f0ff;
}

/* file icon & name */
.doc-name {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  border: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.doc-icon.is-folder {
  background: #fef3e2;
  color: #ff7a00;
}

.doc-icon.is-file {
  background: #e6f7ff;
  color: #0066cc;
}

.docs-table tbody tr:hover .doc-icon {
  transform: scale(1.1);
}

.doc-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.doc-link:hover {
  color: #0066cc;
  text-decoration: none;
}

.doc-type {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-type.folder {
  background: #fef3e2;
  color: #b8860b;
}

.doc-type.file {
  background: #e6f7ff;
  color: #0066cc;
}

.doc-actions {
  display: none;
  gap: 6px;
  margin-left: 8px;
}

.docs-table tbody tr:hover .doc-actions {
  display: flex;
}

.doc-action-btn {
  background: none;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  color: #6b7280;
  font-size: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.doc-action-btn:hover {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
}

/* meta */
.small-meta {
  display: block;
  color: #6b7280;
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

/* empty/loading/error */
.docs-empty,
.docs-loading,
.docs-error {
  text-align: center;
  padding: 28px;
  color: #6b7280;
  background: transparent;
}

.docs-empty h2 {
  margin: 0 0 8px 0;
  font-size: 32px;
  color: #14213d;
}

/* responsive */
@media (max-width: 900px) {
  .docs-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .docs-search input {
    width: 100%;
  }

  .docs-table {
    min-width: 600px;
  }
}

/* Cards view em mobile */
@media (max-width: 768px) {
  .docs-table {
    display: block;
    min-width: auto;
  }

  .docs-table thead {
    display: none;
  }

  .docs-table tbody,
  .docs-table tr,
  .docs-table td {
    display: block;
  }

  .docs-table tr {
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
  }

  .docs-table td {
    padding: 8px 0;
    border-bottom: none;
  }

  .docs-table td.col-check {
    display: none;
  }

  .docs-table td.col-name {
    width: 100%;
  }

  .docs-table td:before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
  }

  .docs-table td.col-author:before {
    content: "Autor";
  }

  .docs-table td.col-date:before {
    content: "Data de Criação";
  }

  .docs-table td.col-size:before {
    content: "Tamanho";
  }

  .doc-name {
    flex-direction: column;
    align-items: flex-start;
  }

  .doc-actions {
    display: flex !important;
    margin-left: 0;
    margin-top: 8px;
  }
}