@import url(./../main.css);
@import url(./../layouts/dashboard-layout.css);
@import url(./../components/sidebar.css);
@import url(./../components/tables.css);
@import url(./../components/buttons.css);
@import url(./../components/modals.css);
@import url(./../components/tabs.css);

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Basic layout copied from nodes module */
.logs-controls {
  margin-top: 24px;
  display: flex;
  gap: 1rem;
  align-items: center;
}
.search-container {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.search-input:focus {
  outline: none;
  border-color: #6b9368;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(107, 147, 104, 0.18);
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* Folder-style tabs */
.logs-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
}
.logs-tabs .tab-btn {
  padding: 0.6rem 1rem;
  border: 1px solid #d1d5db;
  background: #cbd2e1;
  cursor: pointer;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  top: 1px;
}
.logs-tabs .tab-btn:not(.active) {
  background: #b3bac8;
}
.logs-tabs .tab-btn.active {
  background: #ffffff;
  border-bottom: 0;
}

/* Force main area to behave correctly inside grid */
.dashboard-page main {
  min-width: 0;
  overflow-x: hidden; /* prevent grid expansion */
}

.table-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  display: block;
  height: auto;
  max-height: none;

  border: 1px solid #d1d5db;
  border-top: 0;
  border-radius: 8px;
  background: #ffffff;
}

.table-scroll-wrapper table {
  height: auto;
  min-width: 1100px;
}

.logs-table {
  width: 100%;
  border-collapse: collapse;
}
.logs-table thead {
  background: #f5f7fa;
}
.logs-table th,
.logs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
}
.pagination-wrapper {
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Pagination styling copied from nodes module for identical appearance */
.pagination-wrapper {
  background: white;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  overflow: hidden;
  padding: 1rem;
}

.nodes-table table {
  margin-bottom: var(--space-075);
}

.search-container {
  margin-top: 40px;
}

/* Pagination Buttons */
.btn-page {
  min-width: 80px;
  height: 36px;
  padding: 0 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Hover */
.btn-page:hover:not(:disabled) {
  border-color: #6b9368;
  color: #4f7c59;
  background: #f3f7f3;
}

/* Active Click */
.btn-page:active:not(:disabled) {
  transform: translateY(1px);
}

/* Disabled State */
.btn-page:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .search-input {
    max-width: 87%;
  }
}
