:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: #102650;
  background: #f4f8fd;
  line-height: 1.55;
  font-size: 16px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.download {
  cursor: pointer;
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid #102650;
  background: #102650;
  color: #fff;
  padding: 0.65rem 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.secondary {
  background: white;
  border-color: #c7d9ef;
  color: #102650;
}
a {
  color: #0059b7;
  overflow-wrap: anywhere;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #b9cce5;
  border-radius: 8px;
  padding: 0.7rem;
  background: #fff;
  color: #102650;
  margin: 0.3rem 0 1rem;
}
textarea {
  min-height: 150px;
  resize: vertical;
}
label {
  display: block;
  font-weight: 600;
}
h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.2rem 0 1rem;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 0 0 0.8rem;
}
h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
p {
  margin: 0.4rem 0 1rem;
}
.eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #5d708c;
}
.signin {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem;
}
.login-card {
  background: #fff;
  border: 1px solid #d3e2f3;
  border-radius: 18px;
  padding: 2.5rem;
  width: min(100%, 480px);
  box-shadow: 0 10px 35px #142d5210;
}
.login-logo {
  width: 100%;
  height: auto;
  margin: 0 0 1.8rem;
}
.login-card button {
  width: 100%;
  margin-bottom: 0.75rem;
}
small {
  display: block;
  color: #5d708c;
  font-size: 0.875rem;
}
.workspace {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid #d3e2f3;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.brand {
  width: 100%;
  height: auto;
}
.sidebar nav {
  display: grid;
  gap: 0.65rem;
}
.sidebar nav button {
  justify-content: flex-start;
  color: #102650;
  background: transparent;
  border-color: transparent;
}
.sidebar nav button[aria-current='page'] {
  background: #edf6ff;
  border-color: #bed7f4;
}
.account {
  margin-top: auto;
  display: grid;
  gap: 0.5rem;
  overflow-wrap: anywhere;
}
.account span {
  font-size: 0.875rem;
  color: #5d708c;
}
main {
  padding: 2.5rem;
  max-width: 1500px;
  width: 100%;
  min-width: 0;
}
header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}
.card,
.empty,
.thread {
  background: #fff;
  border: 1px solid #d3e2f3;
  border-radius: 12px;
  padding: 1.5rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.card p {
  color: #5d708c;
}
.card .download {
  margin-top: 0.7rem;
}
.amount {
  font-size: 1.5rem;
  font-weight: 700;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.875rem;
  background: #ecf4fd;
  color: #224975;
}
.unpaid,
.overdue {
  background: #fff1dc;
  color: #775006;
}
.paid {
  background: #e7f5ee;
  color: #17633e;
}
.void {
  background: #f0f2f6;
  color: #5d708c;
}
.toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.messages {
  display: grid;
  gap: 1rem;
  margin: 1rem 0;
}
.message {
  padding: 1rem;
  background: #f6f9fd;
  border-radius: 8px;
}
.message p,
.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message small {
  margin-bottom: 0.5rem;
}
.attachments {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.attachments a {
  font-size: 0.875rem;
}
.thread form {
  border-top: 1px solid #d3e2f3;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}
.loading {
  padding: 3rem;
  text-align: center;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 5;
  background: white;
  padding: 0.5rem;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #007cc2;
  outline-offset: 3px;
}
.error {
  color: #9c2727;
}
.success {
  color: #166646;
}
@media (max-width: 760px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid #d3e2f3;
    padding: 1rem;
    gap: 1rem;
  }
  .brand {
    width: 210px;
  }
  .sidebar nav {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
  }
  .sidebar nav button {
    justify-content: center;
    padding: 0.55rem;
  }
  .sidebar > .eyebrow {
    display: none;
  }
  .account {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
  }
  .account span {
    flex: 1;
  }
  .account button {
    margin-left: auto;
  }
  .account strong {
    display: none;
  }
  main {
    padding: 1.25rem;
  }
  h1 {
    font-size: 1.75rem;
  }
  .login-card {
    padding: 1.5rem;
  }
  header {
    align-items: flex-start;
  }
  .card,
  .empty,
  .thread {
    padding: 1.2rem;
  }
}
