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;
  background-color: #f4f6f9;
}

.table {
  background-color: #fff;
}

.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;
}

/* ---------------------------------------------------------------------
   EDI Gateway dashboard
--------------------------------------------------------------------- */

:root {
  --edi-navy: #0b1f3a;
  --edi-navy-2: #142a4d;
  --edi-accent: #2f7ed8;
  --edi-accent-2: #f7931e;
  --edi-ink: #1c2b3a;
  --edi-muted: #6b7c93;
  --edi-border: #e2e8f0;
}

.edi-hero {
  background: linear-gradient(135deg, var(--edi-navy) 0%, var(--edi-navy-2) 65%, #1b3a63 100%);
  color: #eef3fa;
  border-radius: 0.75rem;
  padding: 2.25rem 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(11, 31, 58, 0.25);
}

.edi-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.edi-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9fc0ee;
}

.edi-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.edi-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #6b7c93;
}

.edi-status-pill.is-online .edi-status-dot {
  background: #35d07f;
  box-shadow: 0 0 6px #35d07f;
}

.edi-status-pill.is-offline .edi-status-dot {
  background: #e5534b;
  box-shadow: 0 0 6px #e5534b;
}

.edi-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.edi-hero-arrow {
  color: var(--edi-accent-2);
}

.edi-hero-sub {
  color: #b9cbe6;
  margin-bottom: 1.5rem;
}

.edi-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.edi-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0.9rem;
  font-weight: 700;
  font-family: "Consolas", "SFMono-Regular", monospace;
  min-width: 4.5rem;
  text-align: center;
}

.edi-flow-step small {
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #b9cbe6;
  font-size: 0.65rem;
  margin-top: 0.15rem;
}

.edi-flow-arrow {
  color: #6b8bbd;
  font-weight: 700;
}

.edi-doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.1rem;
}

.edi-doc-card {
  background: #fff;
  border: 1px solid var(--edi-border);
  border-radius: 0.65rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 30, 60, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.edi-doc-card:hover {
  box-shadow: 0 8px 20px rgba(15, 30, 60, 0.1);
  transform: translateY(-2px);
}

.edi-doc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.edi-doc-code {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--edi-navy);
}

.edi-direction-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.edi-direction-badge.dir-in {
  background: #e6f0fc;
  color: var(--edi-accent);
}

.edi-direction-badge.dir-out {
  background: #fdecdc;
  color: #c2660c;
}

.edi-doc-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--edi-ink);
  margin: 0;
}

.edi-doc-role {
  color: var(--edi-muted);
  font-size: 0.85rem;
  margin: 0;
  min-height: 2.4em;
}

.edi-doc-stats {
  display: flex;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-top: 1px solid var(--edi-border);
  border-bottom: 1px solid var(--edi-border);
}

.edi-stat-value {
  display: block;
  font-weight: 700;
  color: var(--edi-ink);
}

.edi-stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--edi-muted);
}

.edi-doc-link {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--edi-accent);
  text-decoration: none;
}

.edi-doc-link:hover {
  text-decoration: underline;
}

.edi-doc-link.is-disabled {
  color: var(--edi-muted);
  cursor: default;
}

/* ---------------------------------------------------------------------
   Login
--------------------------------------------------------------------- */

.edi-login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--edi-navy) 0%, var(--edi-navy-2) 65%, #1b3a63 100%);
}

.edi-login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 1rem;
  position: relative;
}

.edi-login-lang {
  position: absolute;
  top: -2.5rem;
  right: 1rem;
}

.edi-login-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 45px rgba(11, 31, 58, 0.35);
}

.edi-login-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--edi-accent);
  margin-bottom: 0.4rem;
}

.edi-login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--edi-navy);
  margin-bottom: 1.25rem;
}

.edi-login-btn {
  background: var(--edi-navy);
  color: #fff;
  font-weight: 600;
}

.edi-login-btn:hover {
  background: var(--edi-navy-2);
  color: #fff;
}

.edi-login-logo {
  height: 40px;
  margin-bottom: 1rem;
}

.edi-navbar-logo {
  height: 28px;
}

.navbar-nav .nav-link {
  white-space: nowrap;
  padding-left: .6rem;
  padding-right: .6rem;
  border-radius: .375rem;
  transition: background-color .15s ease-in-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  background-color: #e9ecef;
}

.navbar-collapse {
  flex-wrap: wrap;
  row-gap: .5rem;
}