/* Model Management Styles */
.model-management {
  max-width: 1400px;
  margin: 0 auto;
}

.model-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-light, #e5e7eb);
}

.model-header-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.model-header-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-gray-100, #f3f4f6);
  color: var(--color-gray-700, #374151);
  border: 1px solid var(--color-gray-300, #d1d5db);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.back-button:hover {
  background: var(--color-gray-200, #e5e7eb);
  color: var(--color-gray-800, #1f2937);
  border-color: var(--color-gray-400, #9ca3af);
}

.model-title h1 {
  margin: 0 0 5px 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary, #111827);
}

.model-title p {
  margin: 0;
  color: var(--color-text-secondary, #6b7280);
  font-size: 1rem;
}

.model-actions {
  display: flex;
  gap: 10px;
}

/* Controls */
.model-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background: var(--color-bg-primary, white);
  border-radius: 8px;
  border: 1px solid var(--color-border-light, #e5e7eb);
}

.search-section {
  flex: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--color-border-medium, #d1d5db);
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
  background: var(--color-bg-primary, white);
  color: var(--color-text-primary, #111827);
}

.search-input:focus {
  border-color: var(--color-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.per-page-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border-medium, #d1d5db);
  border-radius: 6px;
  background: var(--color-bg-primary, white);
  color: var(--color-text-primary, #111827);
  font-size: 0.9rem;
}

/* Bulk Actions */
.bulk-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  margin-bottom: 20px;
}

.bulk-actions span {
  font-weight: 500;
  color: #92400e;
}

/* Table */
.model-table-container {
  background: var(--color-bg-primary, white);
  border-radius: 8px;
  border: 1px solid var(--color-border-light, #e5e7eb);
  overflow: hidden;
  margin-bottom: 20px;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
}

.model-table th,
.model-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light, #f3f4f6);
}

.model-table th {
  background: var(--color-bg-secondary, #f9fafb);
  font-weight: 600;
  color: var(--color-text-primary, #374151);
  font-size: 0.9rem;
  position: relative;
}

.pk-indicator {
  background: var(--color-primary, #3b82f6);
  color: white;
  font-size: 0.7rem;
  padding: 2px 4px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: 500;
}

.model-table tr:hover {
  background: var(--color-bg-secondary, #f9fafb);
}

.model-table td {
  font-size: 0.9rem;
  color: var(--color-text-primary, #374151);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-actions {
  display: flex;
  gap: 5px;
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-primary, #3b82f6);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark, #2563eb);
}

.btn-secondary {
  background: var(--color-gray-600, #6b7280);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-gray-700, #4b5563);
}

.btn-danger {
  background: var(--color-danger, #ef4444);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger-dark, #dc2626);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 20px;
}

.pagination-info {
  font-weight: 500;
  color: var(--color-text-primary, #374151);
}

/* Error State */
.model-error {
  text-align: center;
  padding: 60px 20px;
}

.model-error h2 {
  margin: 0 0 10px 0;
  color: var(--color-danger, #dc2626);
}

.model-error p {
  margin: 0 0 20px 0;
  color: var(--color-text-secondary, #6b7280);
}

.retry-btn {
  background: var(--color-primary, #3b82f6);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.retry-btn:hover {
  background: var(--color-primary-dark, #2563eb);
}

/* Admin Page Loading - Centered within admin content area */
.admin-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px); /* Account for header and padding */
  width: 100%;
}

/* Responsive Design - Sidebar-aware breakpoints */
/* Large desktop screens - sidebar + content fits comfortably */

/* Medium desktop - account for sidebar width (1024px - 280px = 744px content) */

/* Small desktop/large tablet - sidebar significantly reduces available width */

/* Small tablets and large mobile screens */

/* Mobile phone screens */

/* Very small mobile screens */
