/* Admin Panel Styles - Phase 3 */

/* Production Tracking Styles */
.production-section {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
}

.production-card {
  width: 100%;
}

.production-card .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-neutral-500);
}

.production-card h3 {
  margin: 0;
  color: var(--text-100);
  font-size: 1.2rem;
}

/* Add Stage Form */
.add-stage-form {
  background: var(--surface-panel);
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-500);
}

.add-stage-form form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.add-stage-form .form-row {
  display: flex;
  flex-direction: column;
}

.add-stage-form .form-row:last-child {
  grid-column: 1 / -1;
}

.add-stage-form label {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-100);
  font-size: 0.9rem;
}

.add-stage-form select,
.add-stage-form textarea {
  padding: 8px 12px;
  border: 1px solid var(--border-neutral-100);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
}

.add-stage-form textarea {
  resize: vertical;
  min-height: 80px;
}

.add-stage-form .form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Production Timeline */
.production-timeline {
  position: relative;
  padding: 20px 0;
}

.production-timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--primary-500),
    var(--success-400)
  );
}

.timeline-item {
  display: flex;
  margin-bottom: 30px;
  position: relative;
}

.timeline-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-surface);
  border: 3px solid var(--border-neutral-100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin-right: 20px;
}

.timeline-marker.status-pending {
  border-color: var(--warning-400);
  background: var(--warning-100);
}

.timeline-marker.status-pending::after {
  content: "⏳";
  font-size: 1.2rem;
}

.timeline-marker.status-in_progress {
  border-color: var(--primary-500);
  background: var(--info-100);
}

.timeline-marker.status-in_progress::after {
  content: "▶";
  color: var(--primary-500);
  font-size: 1rem;
}

.timeline-marker.status-completed {
  border-color: var(--success-400);
  background: var(--success-200);
}

.timeline-marker.status-completed::after {
  content: "✓";
  color: var(--success-400);
  font-weight: bold;
  font-size: 1.2rem;
}

.timeline-content {
  flex-grow: 1;
  background: var(--surface-panel);
  padding: 15px;
  border-radius: 6px;
  border-left: 3px solid var(--border-neutral-100);
}

.timeline-content.status-pending {
  border-left-color: var(--warning-400);
}

.timeline-content.status-in_progress {
  border-left-color: var(--primary-500);
}

.timeline-content.status-completed {
  border-left-color: var(--success-400);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.timeline-header h4 {
  margin: 0;
  color: var(--text-100);
  font-size: 1.05rem;
}

.timeline-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-500);
  margin-bottom: 10px;
}

.timeline-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.timeline-notes {
  background: var(--gradient-surface);
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-500);
}

.timeline-notes strong {
  color: var(--text-100);
}

.timeline-times {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-500);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--text-200);
}

.no-data {
  color: var(--text-muted-2);
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* Production Actions */
.production-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--border-neutral-500);
  text-align: right;
}

.production-actions form {
  display: inline;
}

.btn-large {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.status-pending {
  background: var(--warning-200);
  color: var(--warning-text);
}

.status-badge.status-quoted {
  background: var(--info-200);
  color: var(--info-text);
}

.status-badge.status-approved {
  background: var(--success-200);
  color: var(--success-text);
}

.status-badge.status-in_progress {
  background: var(--info-300);
  color: var(--progress-text);
}

.status-badge.status-completed {
  background: var(--success-200);
  color: var(--success-text);
}

.status-badge.status-delivered {
  background: var(--success-200);
  color: var(--success-text);
}

.status-badge.status-cancelled {
  background: var(--danger-200);
  color: var(--danger-text);
}

.status-badge.large {
  padding: 8px 16px;
  font-size: 0.95rem;
}

.status-badge.status-clean {
  background: var(--success-200);
  color: var(--success-text);
}

.status-badge.status-infected {
  background: var(--danger-200);
  color: var(--danger-text);
}

.status-badge.status-pending {
  background: var(--warning-200);
  color: var(--warning-text);
}

/* Responsive Design */
@media (max-width: 768px) {
  .add-stage-form form {
    grid-template-columns: 1fr;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .timeline-meta {
    flex-direction: column;
    gap: 5px;
  }

  .production-section {
    padding: 15px;
  }

  .add-stage-form {
    padding: 15px;
  }
}

/* Admin visual enforcement - always dark */
.production-card {
  background: var(--surface-700);
  color: var(--text-200);
}

.timeline-content {
  background: var(--surface-650);
  color: var(--text-200);
}

.timeline-content.status-completed {
  border-left-color: var(--success-400);
}

.add-stage-form {
  background: var(--surface-650);
  border-left-color: var(--primary-500);
}

body.theme-dark .production-section,
body.theme-dark .add-stage-form,
body.theme-dark .timeline-content,
body.theme-dark .timeline-notes,
body.theme-dark .no-data {
  background: var(--gradient-surface) !important;
  color: var(--text-100) !important;
  border-color: var(--border-card-stronger) !important;
}

body.theme-dark .production-card .section-header,
body.theme-dark .production-actions,
body.theme-dark .timeline-times {
  border-color: var(--border-card-soft) !important;
}

body.theme-dark .production-card h3,
body.theme-dark .timeline-header h4,
body.theme-dark .timeline-notes strong,
body.theme-dark .timeline-meta,
body.theme-dark .timeline-times,
body.theme-dark .add-stage-form label,
body.theme-dark .no-data {
  color: var(--text-100) !important;
}

body.theme-dark .add-stage-form select,
body.theme-dark .add-stage-form textarea {
  background: var(--surface-panel) !important;
  color: var(--text-100) !important;
  border-color: var(--border-input) !important;
}

body.theme-dark .timeline-marker {
  background: var(--surface-overlay-strong) !important;
  border-color: var(--border-strong) !important;
}

body.theme-dark .status-badge {
  background: var(--surface-650) !important;
  color: var(--text-100) !important;
  border: 1px solid var(--border-soft) !important;
}

.add-stage-form label {
  color: var(--text-200);
}

.add-stage-form select,
.add-stage-form textarea {
  background: var(--surface-700);
  border-color: var(--text-500);
  color: var(--text-200);
}

.timeline-notes {
  background: var(--surface-700);
  color: var(--text-500);
}

.timeline-notes strong {
  color: var(--text-200);
}

/* ===== Migrated Local Styles (admin pages) ===== */
/* ---- migrated from public/admin/dashboard.php ---- */
   .admin-dashboard {
  padding: 20px;
}

.admin-header {
  margin-bottom: 30px;
}

.admin-header h1 {
  color: var(--text-100);
  margin-bottom: 5px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-card.warning {
  border-left: 4px solid var(--accent-orange);
}

.stat-icon {
  font-size: 2rem;
}

.stat-content h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--text-100);
}

.stat-content p {
  margin: 5px 0 0 0;
  color: var(--text-500);
  font-size: 0.9rem;
}

.dashboard-content {
  display: grid;
  gap: 30px;
}

.dashboard-section {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  color: var(--text-100);
}

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

.orders-table th,
.orders-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-400);
}

.orders-table th {
  background: var(--surface-panel-alt);
  font-weight: 600;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-pending {
  background: var(--surface-warning);
  color: var(--warning-text);
}

.status-quoted {
  background: var(--info-200);
  color: var(--info-text);
}

.status-approved {
  background: var(--success-200);
  color: var(--success-text);
}

.status-in_progress {
  background: var(--info-300);
  color: var(--progress-text);
}

.status-completed {
  background: var(--success-200);
  color: var(--success-text);
}

.status-delivered {
  background: var(--info-200);
  color: var(--info-text);
}

.status-cancelled {
  background: var(--danger-200);
  color: var(--danger-text);
}

.pending-orders {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pending-order-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 6px;
  background: var(--surface-panel-alt);
}

.order-info h4 {
  margin: 0 0 5px 0;
  color: var(--text-100);
}

.order-info p {
  margin: 0 0 5px 0;
  color: var(--text-500);
}

.low-stock-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.low-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--surface-warning);
  border-radius: 4px;
}

.stock-amount.critical {
  color: var(--danger-400);
  font-weight: bold;
}

.stock-amount.warning {
  color: var(--accent-orange);
  font-weight: bold;
}

.no-data {
  text-align: center;
  color: var(--text-500);
  font-style: italic;
  padding: 20px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-secondary {
  background: var(--surface-650);
  color: white;
}

.btn-small {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.btn:hover {
  opacity: 0.9;
}
/* ---- migrated from public/admin/orders.php ---- */
   .admin-orders {
  padding: 20px;
}

.admin-header {
  margin-bottom: 30px;
}

.admin-header h1 {
  color: var(--text-100);
  margin-bottom: 5px;
}

.filters-section {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.status-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 2px solid var(--border-neutral-200);
  color: var(--text-500);
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

.orders-table-container {
  background: var(--gradient-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.orders-table th,
.orders-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-400);
}

.orders-table th {
  background: var(--surface-panel-alt);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.orders-table tbody tr:hover {
  background: var(--surface-panel-alt);
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

.status-pending {
  background: var(--surface-warning);
  color: var(--warning-text);
}

.status-quoted {
  background: var(--info-200);
  color: var(--info-text);
}

.status-approved {
  background: var(--success-200);
  color: var(--success-text);
}

.status-in_progress {
  background: var(--info-300);
  color: var(--progress-text);
}

.status-completed {
  background: var(--success-200);
  color: var(--success-text);
}

.status-delivered {
  background: var(--info-200);
  color: var(--info-text);
}

.status-cancelled {
  background: var(--danger-200);
  color: var(--danger-text);
}

.actions-cell {
  white-space: nowrap;
}

.no-data {
  text-align: center;
  color: var(--text-500);
  font-style: italic;
  padding: 40px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
}

.page-btn {
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--border-neutral-200);
  color: var(--text-500);
  transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-modal);
}

.modal-content {
  background-color: var(--surface-panel);
  margin: 10% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-sm);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-100);
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted-2);
}

.modal-close:hover {
  color: var(--text-100);
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-100);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-secondary {
  background: var(--surface-650);
  color: white;
}

.btn-small {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.btn:hover {
  opacity: 0.9;
}
/* ---- migrated from public/admin/order_details.php ---- */
   .admin-order-details {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  margin-bottom: 30px;
}

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

.admin-header h1 {
  color: var(--text-100);
  margin-bottom: 5px;
}

.header-actions {
  margin-top: 10px;
}

.order-content {
  display: grid;
  gap: 30px;
}

/* Status Section */
.status-section .status-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.status-card h3 {
  margin-top: 0;
  color: var(--text-100);
}

.current-status {
  margin: 15px 0;
}

.status-badge.large {
  font-size: 1rem;
  padding: 8px 16px;
}

.status-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-neutral-200);
}

.form-row {
  margin-bottom: 15px;
}

.form-row label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-100);
}

.form-row select,
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 4px;
  font-size: 14px;
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

/* Info Section */
.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.info-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  margin-top: 0;
  color: var(--text-100);
  margin-bottom: 15px;
}

.info-grid {
  display: grid;
  gap: 10px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-panel-alt);
}

.info-item.full-width {
  flex-direction: column;
  align-items: flex-start;
}

.info-item label {
  font-weight: 500;
  color: var(--text-500);
  min-width: 120px;
}

.info-item span {
  color: var(--text-100);
  text-align: right;
}

.info-item.full-width span {
  margin-top: 5px;
  white-space: pre-line;
}

/* Materials Section */
.materials-section .materials-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.materials-card h3 {
  margin-top: 0;
  color: var(--text-100);
  margin-bottom: 15px;
}

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

.materials-table th,
.materials-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-400);
}

.materials-table th {
  background: var(--surface-panel-alt);
  font-weight: 600;
}

.materials-table tfoot th,
.materials-table tfoot td {
  border-top: 2px solid var(--border-neutral-200);
  font-weight: 600;
}

/* Uploads Section */
.uploads-section .uploads-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.uploads-card h3 {
  margin-top: 0;
  color: var(--text-100);
  margin-bottom: 15px;
}

.uploads-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.upload-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 6px;
  background: var(--surface-panel-alt);
}

.upload-info h4 {
  margin: 0 0 8px 0;
  color: var(--text-100);
}

.upload-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-500);
}

.scan-status.clean {
  color: var(--success-400);
}

.scan-status.infected {
  color: var(--danger-400);
}

.scan-status.pending {
  color: var(--warning-400);
}

.upload-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Pricing Section */
.pricing-section .pricing-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.pricing-card h3 {
  margin-top: 0;
  color: var(--text-100);
  margin-bottom: 15px;
}

.pricing-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-panel-alt);
}

.pricing-row.total {
  border-bottom: 2px solid var(--text-100);
  font-weight: 600;
  font-size: 1.1rem;
}

.pricing-row.paid {
  color: var(--success-400);
  font-weight: 500;
}

/* Status badges */
.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block;
}

.status-pending {
  background: var(--surface-warning);
  color: var(--warning-text);
}

.status-quoted {
  background: var(--info-200);
  color: var(--info-text);
}

.status-approved {
  background: var(--success-200);
  color: var(--success-text);
}

.status-in_progress {
  background: var(--info-300);
  color: var(--progress-text);
}

.status-completed {
  background: var(--success-200);
  color: var(--success-text);
}

.status-delivered {
  background: var(--info-200);
  color: var(--info-text);
}

.status-cancelled {
  background: var(--danger-200);
  color: var(--danger-text);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-secondary {
  background: var(--surface-650);
  color: white;
}

.btn-small {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.btn:hover {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  .info-section {
    grid-template-columns: 1fr;
  }

  .upload-item {
    flex-direction: column;
    gap: 10px;
  }

  .upload-actions {
    align-self: flex-end;
  }
}
/* ---- migrated from public/admin/materials.php ---- */
   .admin-materials {
  padding: 20px;
}

.admin-header {
  margin-bottom: 30px;
}

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

.admin-header h1 {
  color: var(--text-100);
  margin-bottom: 5px;
}

.header-actions {
  margin-top: 10px;
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background: var(--success-200);
  color: var(--success-text);
  border: 1px solid var(--border-success-soft-light);
}

.alert-error {
  background: var(--danger-200);
  color: var(--danger-text);
  border: 1px solid var(--border-danger-soft);
}

.materials-table-container {
  background: var(--gradient-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

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

.materials-table th,
.materials-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-400);
}

.materials-table th {
  background: var(--surface-panel-alt);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.materials-table tbody tr:hover {
  background: var(--surface-panel-alt);
}

.low-stock {
  color: var(--danger-400);
  font-weight: bold;
}

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-success {
  background: var(--success-200);
  color: var(--success-text);
}

.badge-secondary {
  background: var(--surface-muted);
  color: var(--text-100);
}

.badge-error {
  background: var(--danger-200);
  color: var(--danger-text);
}

.actions-cell {
  white-space: nowrap;
}

.no-data {
  text-align: center;
  color: var(--text-500);
  font-style: italic;
  padding: 40px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-modal);
}

.modal-content {
  background-color: var(--surface-panel);
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
}

.modal-content.small {
  max-width: 400px;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-100);
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted-2);
}

.modal-close:hover {
  color: var(--text-100);
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-100);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-secondary {
  background: var(--surface-650);
  color: white;
}

.btn-small {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.btn:hover {
  opacity: 0.9;
}
/* ---- migrated from public/admin/recycling.php ---- */
   .admin-recycling {
  padding: 20px;
}

.admin-header {
  margin-bottom: 30px;
}

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

.admin-header h1 {
  color: var(--text-100);
  margin-bottom: 5px;
}

.header-actions {
  margin-top: 10px;
}

.alert {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert-success {
  background: var(--success-200);
  color: var(--success-text);
  border: 1px solid var(--border-success-soft-light);
}

.alert-error {
  background: var(--danger-200);
  color: var(--danger-text);
  border: 1px solid var(--border-danger-soft);
}

.stats-section {
  margin-bottom: 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-icon {
  font-size: 2rem;
}

.stat-content h3 {
  margin: 0;
  font-size: 2rem;
  color: var(--text-100);
}

.stat-content p {
  margin: 5px 0 0 0;
  color: var(--text-500);
  font-size: 0.9rem;
}

.collections-section {
  background: var(--gradient-surface);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0;
  color: var(--text-100);
}

.collections-table-container {
  overflow-x: auto;
}

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

.collections-table th,
.collections-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-neutral-400);
}

.collections-table th {
  background: var(--surface-panel-alt);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.collections-table tbody tr:hover {
  background: var(--surface-panel-alt);
}

.no-data {
  text-align: center;
  color: var(--text-500);
  font-style: italic;
  padding: 40px;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-modal);
}

.modal-content {
  background-color: var(--surface-panel);
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-sm);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-neutral-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-100);
}

.modal-close {
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted-2);
}

.modal-close:hover {
  color: var(--text-100);
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 15px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-100);
}

.form-group input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-neutral-200);
  border-radius: 4px;
  font-size: 14px;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--gradient-surface);
  border: 1px solid var(--border-neutral-200);
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.suggestions-list:empty {
  display: none;
}

.suggestions-list:not(:empty) {
  display: block;
}

.suggestion-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface-panel-alt);
}

.suggestion-item:hover {
  background: var(--surface-panel-alt);
}

.selected-user {
  margin-top: 5px;
  padding: 8px;
  background: var(--surface-muted);
  border-radius: 4px;
  font-size: 0.9rem;
}

.points-preview {
  margin: 15px 0;
  padding: 10px;
  background: var(--surface-muted);
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-500);
  color: white;
}

.btn-secondary {
  background: var(--surface-650);
  color: white;
}

.btn:hover {
  opacity: 0.9;
}
