:root {
  --blue: #0756ae;
  --navy: #003e88;
  --orange: #f7931e;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --border: #d9dee8;
  --danger: #dc2626;
  --warning: #d97706;
  --soon: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  background: var(--blue);
  color: white;
  padding: 24px 6%;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand img {
  width: 210px;
  max-height: 72px;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: 30px;
}

.brand p {
  margin: 6px 0 0;
  opacity: 0.9;
}

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

.page {
  padding: 28px 6%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  font-size: 36px;
  margin-top: 8px;
}

.stat-card.warning strong {
  color: var(--warning);
}

.stat-card.soon strong {
  color: var(--soon);
}

.stat-card.danger strong {
  color: var(--danger);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 12px;
}

input,
select {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  background: white;
}

.table-wrap {
  overflow-x: auto;
}

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

th {
  text-align: left;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  padding: 14px;
}

td {
  border-bottom: 1px solid var(--border);
  padding: 16px 14px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.badge.complete {
  background: #dcfce7;
  color: #166534;
}

.badge.missing {
  background: #fef3c7;
  color: #92400e;
}

.badge.expiring {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.expired {
  background: #fee2e2;
  color: #991b1b;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn.primary {
  background: var(--orange);
  color: #111827;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn.small {
  padding: 8px 12px;
  background: var(--blue);
  color: white;
}

.btn.full {
  width: 100%;
  margin-top: 8px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.hidden {
  display: none;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 460px;
  border-radius: 18px;
  padding: 22px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-head button {
  font-size: 28px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

form {
  display: grid;
  gap: 14px;
}

label {
  font-weight: 800;
  display: grid;
  gap: 7px;
}

@media (max-width: 900px) {
  .topbar,
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .filters {
    width: 100%;
    flex-direction: column;
  }

  input,
  select {
    width: 100%;
  }
}

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

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand img {
    width: 180px;
  }
}

.danger-btn {
  background: #dc2626;
  color: white;
}

.danger-btn:hover {
  background: #b91c1c;
}


.danger-text {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  line-height: 1.4;
}


.delete-doc-preview {
  border: 1px solid #d9dee8;
  border-radius: 12px;
  padding: 12px;
  margin: 14px 0;
  display: grid;
  gap: 4px;
  background: #f8fafc;
}

.delete-doc-preview span {
  color: #667085;
  font-weight: 700;
}

.badge.na {
  background: #e5e7eb;
  color: #374151;
}
