:root {
  --red: #dc2626;
  --blue: #2563eb;
  --orange: #ea580c;
  --green: #059669;
  --gray-900: #111827;
  --gray-600: #4b5563;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --bg: #f9fafb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--gray-900);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: white;
  border-bottom: 1px solid var(--gray-300);
}

.top-bar .brand {
  font-weight: 800;
  font-size: 20px;
  color: var(--red);
}

.top-bar .brand span { color: var(--gray-900); }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: #b91c1c; }
.btn-secondary { background: var(--gray-100); color: var(--gray-900); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-outline { background: transparent; border: 1px solid var(--gray-300); color: var(--gray-900); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.center-wrap {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: white;
  border-radius: 14px;
  border: 1px solid var(--gray-300);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card h1 { font-size: 22px; margin: 0 0 6px; }
.card p.hint { color: var(--gray-600); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  font-size: 14px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--blue); border-color: transparent; }

.form-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.form-error.show { display: block; }

.form-success {
  background: #d1fae5;
  color: #065f46;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.form-success.show { display: block; }

.switch-link { text-align: center; font-size: 14px; margin-top: 18px; color: var(--gray-600); }
.switch-link a { color: var(--blue); text-decoration: none; font-weight: 600; }

.container { max-width: 960px; margin: 0 auto; padding: 32px 24px; }

.status-banner {
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 15px;
}
.status-banner.pending { background: #fef3c7; color: #92400e; }
.status-banner.rejected { background: #fee2e2; color: #991b1b; }

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}
.role-civilian { background: var(--gray-600); }
.role-police { background: var(--blue); }
.role-hospital { background: var(--red); }
.role-firestation { background: var(--orange); }
.role-pharmacy { background: var(--green); }
.role-admin { background: #7c3aed; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.feature-card {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 20px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--gray-600); }
.feature-card .emoji { font-size: 26px; margin-bottom: 10px; }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
th { background: var(--gray-100); font-size: 12px; text-transform: uppercase; color: var(--gray-600); }
tr:last-child td { border-bottom: none; }

.row-actions { display: flex; gap: 8px; }
.row-actions .btn { padding: 6px 12px; font-size: 12px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--gray-600); }
.clickable-card {
    cursor: pointer;
    position: relative;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.clickable-card:hover {
    transform: translateY(-4px);
    border-color: #dc2626;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.feature-link {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
}
/* ========================================
   Hospital Patient Records
======================================== */

.feature-card.clickable {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.feature-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.08);
}


.patient-search-panel {
  max-width: 720px;
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 24px;
}


.patient-result-card {
  margin-top: 22px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px;
  background: var(--gray-50);
}


.patient-result-header h2 {
  margin: 5px 0 16px;
}


.patient-found {
  color: #047857;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


.patient-detail {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  padding: 10px 0;

  border-top:
    1px solid var(--gray-200);

  font-size: 14px;
}


.patient-detail span {
  color: var(--gray-600);
}


.patient-detail strong {
  text-align: right;
  overflow-wrap: anywhere;
}


.step-note {
  margin: 16px 0 0;

  padding: 12px;

  border-radius: 10px;

  background: #eff6ff;
  color: #1e40af;

  font-size: 13px;
}