html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* --- PharmArc Global branding --- */
.pharmarc-logo {
  height: 52px;
  width: auto;
}

.pharmarc-brand-text {
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 1.1rem;
}

/* --- Landing page sections --- */
.landing-hero {
  background: radial-gradient(circle at top left, #0bd3ff 0, #0067a3 40%, #021c30 100%);
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 2.5rem 2.25rem;
  margin-bottom: 2rem;
}

.landing-hero h1 {
  font-size: 2.3rem;
  font-weight: 700;
}

.landing-hero p.lead {
  font-size: 1.05rem;
  max-width: 38rem;
}

.landing-hero-card {
  background-color: rgba(4, 26, 47, 0.9);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  color: #e6f4ff;
}

.landing-hero-badges {
  font-size: 0.85rem;
}

.landing-hero-badges span {
  margin-right: 1rem;
  display: inline-flex;
  align-items: center;
}

.landing-hero-badges span::before {
  content: "•";
  margin-right: 0.35rem;
}

.landing-section {
  margin-bottom: 2.5rem;
}

.landing-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.landing-feature-card {
  border-radius: 0.75rem;
  border: 1px solid #e1e6ee;
  padding: 1.5rem;
  height: 100%;
  background-color: #ffffff;
}

.landing-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.landing-band {
  border-radius: 0.75rem;
  background: #f3f7fb;
  padding: 1.5rem 1.75rem;
}

.landing-cta {
  border-radius: 0.75rem;
  background: linear-gradient(90deg, #0067a3, #00a9e0);
  color: #ffffff;
  padding: 1.75rem 1.75rem;
}

.landing-cta h2 {
  margin-bottom: 0.5rem;
}

.landing-cta .btn-outline-light {
  border-width: 1.5px;
}

/* -------------------------
   Auth pages (Register/Login)
------------------------- */
.auth-page {
  padding: 0 1.5rem;
}

.auth-inner,
.auth-wrapper {
  max-width: 1040px;
  margin: 3rem auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.auth-info {
  flex: 1 1 40%;
  min-width: 260px;
}

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.auth-info h1,
.auth-info h2,
.auth-heading {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #0b2745;
}

.auth-info p,
.auth-subtitle {
  color: #4b5b70;
  margin-bottom: 0.75rem;
}

.auth-info ul,
.auth-bullets {
  padding-left: 1.2rem;
  color: #4b5b70;
}

.auth-card {
  flex: 1 1 40%;
  min-width: 280px;
  background: #ffffff;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.auth-title,
.auth-card-title {
  margin-bottom: 0.5rem;
}

.auth-card-subtitle {
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  color: #64748b;
}

.auth-submit-btn {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 0.5rem;
}

.auth-meta {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.auth-footer-link {
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
}

.auth-footer-link:hover {
  text-decoration: underline;
}

.auth-divider {
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

@media (max-width: 768px) {
  .auth-inner,
  .auth-wrapper {
    margin-top: 2rem;
  }

  .auth-card {
    padding: 1.5rem;
  }
}

/* === Dashboard === */
.dashboard-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.dashboard-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dashboard-subtitle {
  margin: 0;
  color: #6c757d;
  font-size: 0.95rem;
}

.dashboard-meta {
  margin-bottom: 1.5rem;
}

.dashboard-company-meta {
  font-size: 0.9rem;
  color: #495057;
}

.dashboard-company-meta .label {
  font-weight: 600;
}

.dashboard-company-meta .separator {
  margin: 0 0.4rem;
  color: #adb5bd;
}

.dashboard-company-callout {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #e7f5ff;
  color: #0b7285;
  font-size: 0.85rem;
}

.dashboard-company-callout .hint {
  font-size: 0.8rem;
  color: #0c8599;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.dashboard-kpi-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

.dashboard-kpi-card .kpi-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #868e96;
  margin-bottom: 0.3rem;
}

.dashboard-kpi-card .kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0b7285;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.04);
  padding: 1.25rem 1.5rem 1.5rem;
}

.dashboard-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}

.dashboard-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.dashboard-card-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #868e96;
}

.dashboard-table {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.dashboard-table thead th {
  border-bottom-width: 1px;
  color: #868e96;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.badge-role {
  background-color: #e7f5ff;
  color: #0b7285;
  font-weight: 500;
}

.badge-status {
  font-weight: 500;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.78rem;
}

.badge-status-sent {
  background-color: #fff4e6;
  color: #d9480f;
}

.badge-status-responded,
.badge-status-accepted {
  background-color: #e6fcf5;
  color: #087f5b;
}

.badge-status-closed,
.badge-status-rejected {
  background-color: #fff5f5;
  color: #c92a2a;
}

.dashboard-empty {
  padding: 1.5rem 0.5rem 0.5rem;
  text-align: center;
  color: #868e96;
}

.dashboard-empty .hint {
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .dashboard-page {
    padding: 1.5rem 1rem 2rem;
  }

  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

/* --- Partner Network --- */
.page-header {
  background: #f8fbff;
  border-radius: 1rem;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.page-subtitle {
  margin: 0;
  color: #6c757d;
}

.filter-card {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.facility-card {
  background: #ffffff;
  border-radius: 1.1rem;
  padding: 1.5rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.facility-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.facility-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.facility-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.facility-meta .location {
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.facility-products .label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #868e96;
}

.facility-actions {
  margin-top: auto;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: #e7f5ff;
  color: #0b7285;
  font-size: 0.8rem;
  font-weight: 600;
}

.supplier-pill {
  background: #f8f0fc;
  color: #862e9c;
}

.facility-empty-card {
  text-align: center;
  background: #ffffff;
  border-radius: 1rem;
  padding: 2.5rem 1.5rem;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  color: #495057;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.details-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.details-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.details-main {
  flex: 1 1 60%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.details-sidebar {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.details-card,
.details-side-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.3rem 1.5rem;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.details-card h3,
.details-side-card h4 {
  margin-bottom: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .details-layout {
    flex-direction: column;
  }

  .details-sidebar {
    flex: 1 1 auto;
  }
}

/* --- Internal lists --- */
.page-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.page-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.table-card {
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

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

.pill-badge-neutral {
  background: #edf2ff;
  color: #364fc7;
}

.empty-state-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.empty-state-card h2 {
  font-size: 1.35rem;
  font-weight: 600;
}

.facility-card.management-card .facility-actions .btn {
  min-width: 160px;
}

.upload-help {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.35rem;
}

.upload-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #f8f9fb;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.45rem 0.75rem;
}

.upload-icon {
  font-size: 1.3rem;
}

.facility-hero-thumb {
  max-height: 120px;
  border-radius: 0.75rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  object-fit: cover;
}

.facility-hero img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 1rem;
}

.pn-card-metrics {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pn-metric-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pn-metric-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.pn-regulatory {
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.pn-reg-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.pn-reg-value {
  font-size: 0.9rem;
  color: #111827;
  word-break: break-word;
}

/* ---- Top bar ---- */
.pg-topbar {
  background-color: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.pg-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1.5rem;
}

.pg-topbar-brand {
  display: flex;
  align-items: center;
}

.pg-brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.pg-brand-logo {
  height: 40px;
  width: auto;
}

.pg-topbar-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.pg-topbar-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 500;
}

.pg-topbar-link:hover {
  color: #2563eb;
}

.pg-topbar-auth {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* ---- User pill / auth links ---- */
.pg-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
}

.pg-user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.pg-user-label {
  color: #64748b;
}

.pg-user-email {
  color: #0f172a;
  font-weight: 500;
  word-break: break-all;
}

.pg-user-logout-form {
  margin: 0;
}

.pg-user-logout-btn {
  border: none;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  background: #2563eb;
  color: #ffffff;
}

.pg-user-logout-btn:hover {
  background: #1d4ed8;
}

.pg-auth-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pg-auth-links a {
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: #0f172a;
}

.pg-auth-links a:hover {
  color: #2563eb;
}

@media (max-width: 768px) {
  .pg-topbar-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .pg-topbar-nav {
    width: 100%;
    justify-content: center;
  }

  .pg-topbar-auth {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

.pg-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.pg-feature-icon svg {
  width: 28px;
  height: 28px;
  stroke: #ffffff;
}

.pg-feature-icon--sourcing {
  background: linear-gradient(135deg, #2563eb, #1ea7ff);
}

.pg-feature-icon--facilities {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
}

.pg-feature-icon--services {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.pg-feature-icon--discover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.pg-feature-icon--evaluate {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
}

.pg-feature-icon--connect {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
}

@media (max-width: 768px) {
  .page-header-inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .btn {
    width: 100%;
  }
}

/* --- Enquiry details --- */
.enquiry-summary-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enquiry-summary-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #6c757d;
  margin-bottom: 0.15rem;
}

.summary-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.enquiry-summary-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #868e96;
  letter-spacing: 0.08em;
}

.meta-value {
  font-weight: 600;
}

.enquiry-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
}

.enquiry-content-card h3,
.enquiry-sidebar-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.detail-list {
  margin: 0;
  padding: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row dt {
  font-weight: 600;
  color: #495057;
}

.detail-row dd {
  margin: 0;
}

.current-status .badge {
  margin-bottom: 0.35rem;
}

.status-form .btn {
  margin-top: 0.25rem;
}

@media (max-width: 992px) {
  .enquiry-details-layout {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
  }
}
