/* Requests Section */
.requests-section {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  background: #f4f6f9;
}

.requests-section > h1 {
  display: none;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== PAGE HEADER ===== */
/* Base styles from .erp-page-header in components.css */
/* .req-page-header for module-specific overrides if needed */

.req-header-content h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 4px;
}

.req-header-content p {
  font-size: 14px;
  color: var(--secondary-color);
  margin: 0;
}

/* Stats, Filter Bar, Tabs, Search Box, Select → using unified erp-* classes from components.css */

/* ===== SECTIONS ===== */
.req-section {
  margin-bottom: 32px;
}

.req-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.req-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin: 0;
}

.req-section.pending .req-section-title {
  color: var(--warning-color);
}

.req-section.pending .req-section-title svg {
  stroke: var(--warning-color);
}

.req-section.processed .req-section-title {
  color: var(--success-color);
}

.req-section.processed .req-section-title svg {
  stroke: var(--success-color);
}

.req-section-count {
  font-size: 13px;
  color: #718096;
  font-weight: 500;
}

/* ===== GRID LAYOUT ===== */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* ===== CARD STYLES ===== */
.req-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow-main);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.req-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.req-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.req-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.req-card-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.req-card-version {
  font-size: 11px;
  color: var(--secondary-color);
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}

.req-card-date {
  font-size: 12px;
  color: #94a3b8;
}

.req-status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.req-status-badge.status-pending {
  background: #fef3c7;
  color: var(--warning-color);
}

.req-status-badge.status-approved {
  background: #dcfce7;
  color: var(--success-color);
}

.req-status-badge.status-rejected {
  background: #fee2e2;
  color: var(--danger-color);
}

.req-card-info {
  padding: 12px 16px;
}

.req-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.req-info-row:not(:last-child) {
  border-bottom: 1px solid #f8fafc;
}

.req-info-label {
  font-size: 12px;
  color: var(--secondary-color);
}

.req-info-value {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.req-status-text.status-pending { color: var(--warning-color); }
.req-status-text.status-approved { color: var(--success-color); }
.req-status-text.status-rejected { color: var(--danger-color); }

.req-card-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}

.req-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.req-btn-view {
  background: #f1f5f9;
  color: #475569;
}

.req-btn-view:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.req-btn-approve {
  background: #dcfce7;
  color: var(--success-color);
}

.req-btn-approve:hover {
  background: #bbf7d0;
}

.req-btn-po {
  background: #ede9fe;
  color: #7c3aed;
}

.req-btn-po:hover {
  background: #ddd6fe;
}

.req-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.req-btn-secondary:hover {
  background: #e2e8f0;
}

/* ===== DETAIL MODAL ===== */
.req-detail-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: var(--blur-content);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.req-detail-modal {
  background: #fff;
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.req-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
}

.req-detail-title h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 8px 0 4px;
}

.req-detail-version {
  font-size: 12px;
  color: var(--secondary-color);
}

.req-detail-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.req-detail-badge.status-pending {
  background: #fef3c7;
  color: var(--warning-color);
}

.req-detail-badge.status-approved {
  background: #dcfce7;
  color: var(--success-color);
}

.req-detail-badge.status-rejected {
  background: #fee2e2;
  color: var(--danger-color);
}

.req-detail-close {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--secondary-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.req-detail-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.req-detail-meta {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #f1f5f9;
}

.req-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.req-meta-label {
  font-size: 11px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.req-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.req-meta-value small {
  font-weight: 400;
  color: var(--secondary-color);
}

.req-detail-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.req-detail-items h3 {
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  margin: 0 0 16px;
}

.req-detail-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.req-detail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
}

.req-detail-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.req-detail-img-placeholder {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.req-detail-item-info {
  flex: 1;
  min-width: 0;
}

.req-detail-item-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px;
}

.req-detail-specs {
  font-size: 12px;
  color: var(--secondary-color);
  margin: 0;
}

.req-detail-qty {
  text-align: center;
  min-width: 60px;
}

.req-qty-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.req-qty-unit {
  font-size: 11px;
  color: #94a3b8;
}

.req-detail-actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.req-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.req-modal-btn.secondary {
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.req-modal-btn.secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e0;
}

.req-modal-btn.primary {
  background: var(--primary-color);
  color: #fff;
}

.req-modal-btn.primary:hover {
  background: var(--primary-hover);
}

.req-modal-btn.danger {
  background: #fee2e2;
  color: var(--danger-color);
}

.req-modal-btn.danger:hover {
  background: #fecaca;
}

.req-modal-btn.warning {
  background: #fef3c7;
  color: var(--warning-color);
}

.req-modal-btn.warning:hover {
  background: #fde68a;
}

/* Responsive Grid */
@media (max-width: 768px) {
  .req-grid {
    grid-template-columns: 1fr;
  }
  
  .req-detail-modal {
    max-height: 100vh;
    border-radius: 0;
  }
  
  .req-detail-meta {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .req-detail-actions {
    flex-direction: column;
  }
  
  .req-modal-btn {
    width: 100%;
  }
}

/* ===== EMPTY STATE ===== */
.req-empty-state {
  text-align: center;
  padding: 80px 40px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-main);
  border: 1px solid #eef0f2;
}

.req-empty-icon {
  margin-bottom: 16px;
}

.req-empty-state h3 {
  font-size: 20px;
  color: #2d3748;
  margin: 0 0 8px;
}

.req-empty-state p {
  color: var(--secondary-color);
  margin: 0;
}

/* ===== RESPONSIVE ===== */
/* Filter responsive → handled by erp-* classes in components.css */

.request-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
  transition: all var(--transition-fast);
}

.request-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  background: #edf2f7;
  color: #4a5568;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
}

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

.req-title-group {
  display: flex;
  flex-direction: column;
}

.req-pdf-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: all var(--transition-fast);
}

.req-pdf-btn:hover {
  background: #f8f9fa;
  color: #333;
  border-color: #ccc;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.req-history-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: all var(--transition-fast);
}

.req-history-btn:hover {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(124, 58, 237, 0.1);
}

.request-header h4 {
  font-size: 18px;
  font-weight: 700;
  color: #0a0a0a;
}

.request-date {
  font-size: 13px;
  color: #777;
}

.request-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255,255,255,.95);
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid rgba(0,0,0,.05);
}

.request-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f9f9f9;
  border-radius: var(--radius-sm);
}

.request-info {
  flex: 1;
}

.request-info strong {
  display: block;
  margin-bottom: 4px;
}

.request-specs {
  font-size: 12px;
  color: #555;
  margin-bottom: 6px;
}

.request-meta {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.request-status {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-approved {
  background: #d4edda;
  color: #155724;
}

.status-rejected {
  background: #f8d7da;
  color: #721c24;
}

.request-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
}

.approve-btn, .reject-btn, .modify-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.approve-btn {
  background: linear-gradient(135deg, var(--success-color), #20c997);
  color: #fff;
  box-shadow: 0 4px 12px rgba(40, 167, 69,.25);
}

.approve-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40, 167, 69,.35);
}

.modify-btn {
  background: linear-gradient(135deg, var(--primary-color), #00bfff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,123,255,.25);
}

.modify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,123,255,.35);
}

.reject-btn {
  background: linear-gradient(135deg, var(--danger-color), #fd7e14);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,53,69,.25);
}

.reject-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,53,69,.35);
}

.create-po-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #6610f2, #6f42c1);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(111, 66, 193, 0.2);
  transition: all var(--transition-fast);
}

.create-po-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(111, 66, 193, 0.3);
}

