:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #15243c;
  background: #f5f7fb;
  font-synthesis: none;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
a {
  color: #265cdb;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button,
.button {
  border: 1px solid #dde4ef;
  border-radius: 10px;
  padding: 10px 15px;
  background: white;
  color: #34445d;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
.button:hover {
  background: #edf3ff;
}
.primary {
  background: #285feb;
  border-color: #285feb;
  color: white;
}
.primary:hover {
  background: #1c4fd0;
}
.danger {
  color: #ba3343;
  background: #fff5f5;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 15px;
}
.muted,
small {
  color: #758199;
}
small {
  font-size: 12px;
}
.eyebrow {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2px;
  color: #8496b7;
}
.layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #101e35;
  color: #c1cde0;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  overflow: auto;
}
.brand {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1.3px;
  color: white;
  margin: 0 10px 5px;
}
.brand i {
  font-style: normal;
  color: #82a6ff;
}
.sidebar .eyebrow {
  margin: 0 10px 32px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #7890b5;
  text-transform: uppercase;
  padding: 16px 12px 8px;
}
.nav-item {
  display: flex;
  gap: 13px;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  color: #aabbd4;
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 9px;
  font-weight: 500;
}
.nav-item span {
  width: 20px;
  text-align: center;
}
.nav-item:hover {
  background: #1a2d49;
  color: white;
}
.nav-item.active {
  background: #285feb;
  color: white;
}
.sidebar-foot {
  margin-top: auto;
  padding: 25px 10px 0;
  font-size: 12px;
  color: #7c90af;
}
.workspace {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 82px;
  background: white;
  border-bottom: 1px solid #e7ecf4;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.topbar p {
  margin: 0;
}
.avatar {
  background: #eaf0ff;
  color: #285feb;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.identity small {
  display: block;
  margin-top: 3px;
}
.content {
  padding: 36px 40px 50px;
  max-width: 1600px;
  margin: auto;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.heading p {
  margin: 0;
  line-height: 1.7;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}
.stat,
.card {
  border: 1px solid #e4eaf3;
  border-radius: 15px;
  background: white;
  box-shadow: 0 3px 6px #15243c02;
}
.stat {
  padding: 23px;
}
.stat .value {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 750;
  margin: 12px 0 5px;
}
.stat .accent {
  color: #285feb;
}
.card {
  padding: 24px;
  margin-bottom: 22px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}
.card-header h2 {
  margin: 0;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar input {
  max-width: 350px;
  margin-right: auto;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
  color: #8490a5;
  font-weight: 650;
  padding: 14px 12px;
  background: #f8faff;
  border-bottom: 1px solid #e8edf5;
}
td {
  padding: 17px 12px;
  border-bottom: 1px solid #edf1f7;
  font-size: 13px;
}
td:first-child {
  font-weight: 600;
}
td small {
  display: block;
  margin-top: 5px;
  font-weight: 400;
}
td button,
.actions button {
  font-size: 12px;
  padding: 7px 10px;
}
.actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #eef2f7;
  color: #63748e;
  font-weight: 600;
}
.badge.green {
  background: #e8f8ef;
  color: #21805c;
}
.badge.amber {
  background: #fff3dc;
  color: #ac741b;
}
.badge.red {
  background: #ffeaec;
  color: #bc4254;
}
.badge.blue {
  background: #edf2ff;
  color: #285feb;
}
.notice {
  padding: 15px 0;
  border-bottom: 1px solid #edf1f7;
  display: flex;
  gap: 12px;
}
.notice-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: #eca93b;
  border-radius: 50%;
  margin-top: 6px;
}
.notice p {
  margin: 0 0 5px;
  font-size: 13px;
}
.empty {
  text-align: center;
  padding: 52px 20px;
  color: #8a97ab;
  white-space: normal;
}
.empty strong {
  display: block;
  color: #34445d;
  font-size: 17px;
  margin-bottom: 8px;
}
.banner {
  border: 1px solid #dce6ff;
  background: #eef4ff;
  border-radius: 12px;
  padding: 15px 18px;
  color: #45618b;
  margin-bottom: 24px;
  font-size: 13px;
  line-height: 1.8;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: #101e35;
  color: white;
  padding: 55px 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-image: radial-gradient(
    ellipse at 10% 90%,
    #285feb55,
    transparent 65%
  );
}
.login-story h1 {
  font-size: 52px;
  line-height: 1.1;
  max-width: 500px;
  letter-spacing: -2px;
}
.login-story p {
  max-width: 370px;
  line-height: 1.8;
  color: #a8bad7;
}
.login-form {
  display: grid;
  place-items: center;
  padding: 40px;
}
.login-box {
  width: 100%;
  max-width: 390px;
}
.login-box h1 {
  margin-bottom: 12px;
}
.login-box p {
  line-height: 1.8;
  margin-bottom: 32px;
}
.login-box button {
  width: 100%;
  margin-top: 10px;
}
.login-box small {
  display: block;
  text-align: center;
  margin-top: 25px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  min-width: 0;
}
.field label {
  font-size: 12px;
  font-weight: 650;
  color: #52627a;
}
.field small {
  line-height: 1.6;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3ee;
  border-radius: 9px;
  padding: 11px 12px;
  background: white;
  color: #25354c;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #2863ef;
}
textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.7;
}
input[type="checkbox"] {
  width: auto;
}
dialog {
  width: min(780px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #15243c;
  box-shadow: 0 20px 100px #0003;
}
dialog::backdrop {
  background: #0b163e88;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 25px 28px;
  border-bottom: 1px solid #e7ecf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-head h2 {
  margin: 0;
}
.modal-body {
  padding: 25px 28px;
}
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.wide {
  grid-column: 1/-1;
}
.error {
  color: #bc3349;
  background: #fff1f2;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  line-height: 1.6;
}
.text-entry {
  border-bottom: 1px solid #e7ecf4;
  padding: 16px 0;
}
.text-entry code {
  font-size: 11px;
  color: #8392a6;
  display: block;
  word-break: break-word;
  margin-bottom: 10px;
}
.text-entry .form-grid {
  gap: 12px;
}
.text-entry textarea {
  min-height: 75px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #142643;
  color: white;
  padding: 15px 22px;
  border-radius: 12px;
  box-shadow: 0 10px 40px #0003;
  display: none;
  z-index: 100;
}
.loading {
  padding: 50px;
  text-align: center;
  color: #758199;
}
.invoice {
  background: white;
  max-width: 850px;
  padding: 60px;
  margin: auto;
}
.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.article-cover {
  max-height: 220px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.search-count {
  color: #8c98aa;
  font-size: 12px;
}
.pill {
  background: #ecf2ff;
  color: #3260c8;
  border-radius: 30px;
  padding: 5px 12px;
  font-size: 11px;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .content {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .layout {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .sidebar {
    width: 205px;
    padding: 25px 12px;
  }
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
  }
  .sidebar .eyebrow,
  .sidebar-foot,
  .nav-label {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 6px;
    margin-top: 16px;
  }
  .nav-item {
    white-space: nowrap;
    margin: 0;
    width: auto;
    padding: 10px;
  }
  .brand {
    font-size: 22px;
  }
  .workspace {
    width: 100%;
  }
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .topbar .muted {
    display: none;
  }
  .content {
    padding: 24px 16px;
  }
  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  h1 {
    font-size: 26px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat .value {
    font-size: 25px;
  }
  .card {
    padding: 17px;
  }
  .login {
    display: block;
  }
  .login-story {
    padding: 30px;
    min-height: 190px;
  }
  .login-story h1 {
    font-size: 30px;
    margin: 20px 0 0;
  }
  .login-story p,
  .login-story small {
    display: none;
  }
  .login-form {
    padding: 35px 25px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  .modal-body,
  .modal-head {
    padding: 20px;
  }
  .identity strong {
    font-size: 12px;
  }
}
@media print {
  body.invoice {
    padding: 20px;
  }
  .invoice p {
    color: #222;
  }
}
