:root {
  --app-bg: #f4f7fb;
  --accent: #0f766e;
  --accent-soft: #e6f8f6;
}

body {
  background: radial-gradient(circle at top left, #dbeafe 0%, var(--app-bg) 40%);
  min-height: 100vh;
}

.app-container {
  max-width: 1400px;
}

.card-soft {
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.kpi-card {
  background: linear-gradient(140deg, #0f766e, #155e75);
  color: #f8fafc;
  border: 0;
}

.kpi-card .card-title {
  font-size: 0.95rem;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
}

.table thead th {
  white-space: nowrap;
}

.table td,
.table th {
  vertical-align: middle;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.table-meta {
  font-size: 0.82rem;
  color: #64748b;
}

.table-shell {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  overflow: hidden;
  background: #ffffff;
}

.table-minimal {
  margin-bottom: 0;
}

.table-minimal thead th {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.table-minimal tbody td {
  border-color: #eef2f7;
}

.table-minimal tbody tr {
  transition: background-color 0.15s ease;
}

.table-minimal tbody tr:hover {
  background: #f8fafc;
}

.table-col-separators thead th:not(:last-child),
.table-col-separators tbody td:not(:last-child) {
  border-right: 1px solid #f1f5f9;
}

.sort-link {
  color: #0f172a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 700;
  border-radius: 0.4rem;
  padding: 0.1rem 0.3rem;
}

.sort-link:hover {
  color: #0f766e;
  background: #ecfeff;
}

.sort-link.active {
  color: #0f766e;
  background: #ecfeff;
}

.badge-soft {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  font-weight: 600;
}

.low-stock {
  background-color: #fff1f2;
}

.filters-sticky {
  position: sticky;
  top: 4.25rem;
  z-index: 20;
}

.app-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-alert-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.85;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(460px, 100%);
}

.form-help {
  font-size: 0.85rem;
  color: #64748b;
}

.address-lines {
  line-height: 1.3;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.row-actions form {
  margin: 0;
}

.po-line-item {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr) 160px auto;
  gap: 0.5rem;
}

.completion-inputs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.completion-inputs .form-control {
  min-width: 110px;
}

@media (max-width: 768px) {
  .po-line-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .filters-sticky {
    position: static;
  }
}
