/*


 */

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Work+Sans:wght@400;500;600;700&display=swap");

:root {
  --color-primary: #408ce9;
  --color-primary-dark: #2f74c7;
  --color-sky: #34c1f9;
  --color-gold: #ea1843;
  --color-red: #fa0036;
  --color-orange: #fc9132;
  --color-ink: #1b2332;
  --color-muted: #5f6c85;
  --color-border: #e2e6f0;
  --color-surface: #ffffff;
  --color-surface-alt: #f4f7fb;
  --shadow-soft: 0 18px 45px rgba(36, 63, 120, 0.12);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", "Helvetica Neue", sans-serif;
  color: var(--color-ink);
  background: radial-gradient(circle at top, #f8fbff, #eef2f8 45%, #e9edf6 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Work Sans", sans-serif;
  margin: 0 0 12px;
}

p {
  margin: 0 0 12px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 25px rgba(35, 60, 110, 0.08);
}

.app-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.app-header .container {
  padding-top: 6px;
  padding-bottom: 6px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.6rem;
  flex-direction: column;
  align-items: center;
}

.nav__brand span {
  font-size: 1.4rem;
  text-align: center;
}

.nav__logo {
  width: 180px;
  height: auto;
  border-radius: 12px;
}

.nav__links {
  display: flex;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav__link {
  font-weight: 600;
  color: var(--color-muted);
}

.nav__link:hover {
  color: var(--color-primary);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__signout {
  display: inline-block;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 6px;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 24px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.table--stacked th {
  width: 220px;
  color: var(--color-muted);
}

.table__actions {
  white-space: nowrap;
}

.definition-list {
  display: grid;
  gap: 12px;
}

.definition-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--color-surface-alt);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.definition-list span {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(64, 140, 233, 0.12);
  color: var(--color-primary-dark);
}

.status-pill--active,
.status-pill--success {
  background: rgba(52, 193, 249, 0.2);
  color: #0b6a98;
}

.status-pill--inactive,
.status-pill--rejected,
.status-pill--submit_failed,
.status-pill--validation_failed,
.status-pill--parsing_failed {
  background: rgba(250, 0, 54, 0.12);
  color: #a30028;
}

.status-pill--processing,
.status-pill--received {
  background: rgba(252, 145, 50, 0.18);
  color: #8a4b12;
}

.status-pill--duplicate {
  background: rgba(234, 24, 67, 0.15);
  color: #a1102f;
}

.link {
  font-weight: 600;
  color: var(--color-primary-dark);
}

.link:hover {
  color: var(--color-primary);
}

.table__actions .link + .link {
  margin-left: 0;
}

.table__actions-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.delete-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.input--small {
  max-width: 200px;
  font-size: 0.85rem;
}

.btn-danger {
  color: var(--color-red);
  border-color: rgba(250, 0, 54, 0.3);
}

.btn-danger:hover {
  background: rgba(250, 0, 54, 0.08);
}

.breadcrumb {
  margin-top: 8px;
}

.reveal-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reveal-field__value {
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(46, 84, 160, 0.15);
}

.btn:disabled,
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn:disabled:hover,
.btn-disabled:hover {
  box-shadow: none;
  transform: none;
}

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

.btn-secondary {
  background: rgba(64, 140, 233, 0.1);
  color: var(--color-primary-dark);
  border-color: rgba(64, 140, 233, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--color-muted);
  border-color: var(--color-border);
}

.form {
  display: grid;
  gap: 16px;
}

.form--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.form__group {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.form__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form__errors {
  background: rgba(250, 0, 54, 0.08);
  border: 1px solid rgba(250, 0, 54, 0.25);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: white;
}

.input:focus {
  outline: 2px solid rgba(64, 140, 233, 0.2);
  border-color: var(--color-primary);
}

.input-with-button {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hint {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.flash {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background: rgba(64, 140, 233, 0.1);
  border: 1px solid rgba(64, 140, 233, 0.3);
}

.flash--alert,
.flash--error {
  background: rgba(250, 0, 54, 0.1);
  border-color: rgba(250, 0, 54, 0.25);
}

.flash--notice {
  background: rgba(52, 193, 249, 0.14);
  border-color: rgba(52, 193, 249, 0.3);
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
  margin: 20px 0 40px;
}

.hero__panel {
  padding: 20px;
}

.hero__brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.hero__logo {
  width: 224px;
  height: 224px;
  border-radius: 20px;
  background: var(--color-surface);
  padding: 10px;
  box-shadow: 0 10px 30px rgba(64, 140, 233, 0.15);
}

.hero__tagline {
  color: var(--color-muted);
  max-width: 440px;
}

.hero__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(64, 140, 233, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-card {
  max-width: 420px;
}

.auth-card--standalone {
  margin: 40px auto 0;
}

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

.code-block {
  background: #0f1724;
  color: #f5f7fb;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  overflow-x: auto;
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav__links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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