:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --success-hover: #059669;
  --danger: #ef4444;
  --font-family: system-ui, sans-serif;
}

.container {
  max-width: 1200px;
  margin: auto;
}

.text-center {
  text-align: center;
}

.card {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  margin-bottom: 30px;
}

.card h5 {
  margin-top: 0;
  border-bottom: 2px solid var(--bg-color);
  padding-bottom: 10px;
}

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

.input-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
  text-transform: uppercase;
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: background-color 0.2s, transform 0.1s;
}

button:hover:not(:disabled) {
  background-color: var(--primary-hover);
}

button:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.search-grid button {
  grid-column: 1 / -1;
  width: 100%;
}


.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  text-align: left;
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.filter-row th {
  background-color: #e2e8f0;
  padding: auto;
}

.filter-row input,
.filter-row select {
  width: 100%;
  padding: auto;
  box-sizing: border-box;
}

.actions a {
  background: var(--success);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  cursor: pointer;
}

.actions a:hover {
  background: var(--success-hover);
}

.actions a.secondary-btn {
  background: var(--bg-color);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.actions a.secondary-btn:hover {
  background: lightgrey;
}

.badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-outward {
  background: #dbeafe;
  color: #1e40af;
}

.badge-inward {
  background: #d1fae5;
  color: #065f46;
}

footer {
  position: relative;
  width: 100%;
  justify-content: center;
  text-align: center;
  margin-top: 20px;
  padding: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Progress Bar */
#progressContainer {
  display: none;
  margin-top: 15px;
}

.progress-bar-bg {
  width: 100%;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
  height: 8px;
  margin-top: 5px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 0.2s;
}