:root {
  --bg: #020617;
  --card: #111827;
  --soft: #1f2937;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --border: #334155;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  border-bottom: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.95);
  padding: 1rem;
}

nav, .container {
  width: min(1100px, 92%);
  margin: auto;
}

nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.container {
  padding: 2rem 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: .35rem;
}

input, select, button {
  width: 100%;
  padding: .8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

input, select {
  background: var(--soft);
  color: var(--text);
}

button, .button {
  display: inline-block;
  cursor: pointer;
  border: none;
  background: var(--accent);
  color: #020617;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  padding: .8rem 1rem;
  border-radius: 10px;
}

.btn-secondary {
  background: #64748b;
  color: white;
}

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

.btn-success {
  background: var(--success);
  color: #020617;
}

.actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.actions a, .actions button {
  width: auto;
}

.message {
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  background: rgba(56,189,248,.12);
  border: 1px solid var(--accent);
}

.error {
  background: rgba(239,68,68,.12);
  border-color: var(--danger);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  border-bottom: 1px solid var(--border);
  padding: .8rem;
  text-align: left;
  vertical-align: top;
}

small, p {
  color: var(--muted);
}

@media (max-width: 700px) {
  .grid {
    grid-template-columns: 1fr;
  }

  nav, .actions {
    flex-direction: column;
    align-items: stretch;
  }

  table, thead, tbody, tr, th, td {
    display: block;
  }

  th {
    display: none;
  }

  td {
    border-bottom: none;
  }

  tr {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }
}

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

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2rem;
  color: var(--accent);
}

.stat span {
  color: var(--muted);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.document-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.document-checklist li {
  align-items: center;
  display: flex;
  gap: 0.6rem;
  margin: 0.6rem 0;
  font-size: 1.05rem;
}

.document-checklist .checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  width: 1.5rem;
}

.document-checklist .complete .checkmark {
  color: #157347;
}

.document-checklist .missing .checkmark {
  color: #b02a37;
}

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

.status-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  background: #eef2f7;
  color: #233042;
}

.status-requested,
.status-pending {
  background: #fff3cd;
  color: #664d03;
}

.status-uploaded,
.status-received,
.status-under-review {
  background: #cff4fc;
  color: #055160;
}

.status-accepted,
.status-approved,
.status-complete {
  background: #d1e7dd;
  color: #0f5132;
}

.status-rejected,
.status-missing {
  background: #f8d7da;
  color: #842029;
}

/* v1.1.4c - Customer dashboard counter outline/card fix
   Restores compact outlined boxes for counters using the current .stats-grid/.stat markup. */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0.75rem;
}

.stats-grid .stat {
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  text-align: left;
  min-height: 70px;
}

.stats-grid .stat strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.stats-grid .stat span {
  display: block;
  color: #bfdbfe;
  font-size: 0.9rem;
  line-height: 1.25;
}
