@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
}
:root {
  font-family:
    "Public Sans",
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #302b35;
  background: #f7f6f2;
  font-synthesis: none;
  --ink: #302b35;
  --muted: #716b74;
  --accent: #a43d27;
  --line: #dfdcd7;
  --paper: #fff;
  --soft: #eeeae4;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 11px 17px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
button:hover {
  background: #4c4252;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.secondary:hover {
  background: var(--soft);
}
.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  padding: 8px;
}
.quiet:hover {
  background: var(--soft);
  color: var(--ink);
}
.danger {
  color: #a02f28;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.7;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1.1px;
  margin-bottom: 9px;
  line-height: 1.15;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 14px;
  font-weight: 650;
}
p {
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
::selection {
  background: #ecd2c3;
  color: #302b35;
}
:focus-visible {
  outline: 3px solid #ad6a48;
  outline-offset: 3px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  font-size: 14px;
  caret-color: var(--accent);
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
  color: #827b83;
}
input:disabled {
  background: #f2f0ed;
  color: #716b74;
}
textarea {
  resize: vertical;
  min-height: 82px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 17px;
}
label input,
label textarea,
label select {
  margin-top: 7px;
}
label small {
  display: block;
  font-weight: 400;
  margin-top: 6px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-weight: 400;
  line-height: 1.5;
}
.check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 38px 22px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: #f1efea;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 700;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 8px 8px 8px 2px;
  font-size: 24px;
  font-weight: 600;
}
.brand-sub {
  margin: 10px 0 42px 44px;
  font-size: 11px;
  color: var(--muted);
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav button {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  font-size: 13px;
}
.nav button.active {
  background: #e5e0d9;
  color: var(--ink);
}
.nav button:hover {
  color: var(--ink);
  background: #e9e5df;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 35px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding: 20px 0 14px;
}
.avatar {
  width: 33px;
  height: 33px;
  background: #ded8d0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.identity strong {
  font-size: 12px;
  display: block;
}
.identity small {
  font-size: 10px;
}
.main {
  padding: 32px 46px 60px;
  max-width: 1600px;
  width: 100%;
  margin: auto;
  align-self: start;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 46px;
  font-size: 12px;
  color: var(--muted);
}
.private {
  display: flex;
  align-items: center;
  gap: 7px;
}
.private svg {
  width: 13px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 30px;
}
.page-head p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.page-head button {
  white-space: nowrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.stat {
  padding: 0 25px;
  border-right: 1px solid var(--line);
}
.stat:first-child {
  padding-left: 0;
}
.stat:last-child {
  border: 0;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.stat strong {
  font-size: 27px;
  letter-spacing: -0.6px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.stat small {
  display: block;
  margin-top: 7px;
}
.notice-box {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  background: #eee7dd;
  border-radius: 8px;
  margin-bottom: 28px;
  font-size: 12px;
  line-height: 1.6;
  align-items: center;
}
.notice-box p {
  margin: 0;
  flex: 1;
}
.notice-box strong {
  font-weight: 600;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0 18px;
  align-items: center;
}
.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 8px 11px;
  font-size: 12px;
}
.tabs button.active {
  background: var(--ink);
  color: white;
}
.search {
  max-width: 240px;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 10px;
  letter-spacing: 0.7px;
  font-weight: 550;
  color: var(--muted);
  background: #fcfbf9;
  padding: 14px 18px;
  text-transform: uppercase;
}
td {
  border-top: 1px solid #eeeae6;
  padding: 18px;
  white-space: nowrap;
}
td strong {
  font-weight: 550;
  display: block;
  margin-bottom: 5px;
}
td small {
  font-size: 11px;
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover {
  background: #faf8f5;
}
.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  background: #eeebef;
  color: #655c6c;
  align-items: center;
  gap: 6px;
}
.badge:before {
  content: "";
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.issued {
  background: #f5eedc;
  color: #7c5a1a;
}
.badge.paid {
  background: #e6eee7;
  color: #365b3c;
}
.badge.overdue {
  background: #f8e6df;
  color: #9c3822;
}
.empty {
  padding: 65px 24px 70px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.empty-icon {
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 70px;
  background: #f1eeea;
  border: 1px solid #e5dfd7;
  border-radius: 10px;
  transform: rotate(-6deg);
}
.empty-icon svg {
  width: 28px;
  height: 28px;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  font-size: 13px;
  max-width: 340px;
  margin: 0 auto 24px;
  color: var(--muted);
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.form-section {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 24px;
}
.form-section h2 {
  font-size: 16px;
  margin-bottom: 22px;
}
.form-section > p {
  font-size: 12px;
  color: var(--muted);
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}
.preview-wrap {
  position: sticky;
  top: 24px;
}
.preview-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.paper {
  background: #fff;
  box-shadow: 0 10px 30px #302b3508;
  border: 1px solid var(--line);
  padding: 35px;
  min-height: 570px;
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.paper h2 {
  font-size: 25px;
  margin: 30px 0 3px;
}
.paper h3 {
  font-size: 13px;
  margin: 0;
}
.paper p {
  margin-bottom: 12px;
}
.paper small {
  font-size: 9px;
}
.paper-logo {
  max-width: 120px;
  max-height: 55px;
  margin-bottom: 20px;
}
.paper .paper-client {
  margin: 25px 0;
}
.paper-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #ece9e4;
}
.paper-row span:first-child {
  flex: 1;
}
.paper-total {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 0;
  margin-top: 12px;
  border-top: 1px solid var(--ink);
  font-size: 17px;
  font-weight: 600;
}
.paper-footer {
  font-size: 9px;
  color: var(--muted);
  padding-top: 20px;
}
.draft-mark {
  color: var(--accent);
  font-size: 10px;
}
.line-item {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.line-item:last-of-type {
  margin-bottom: 12px;
}
.line-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.line-heading span {
  font-size: 11px;
  color: var(--muted);
}
.line-item textarea {
  min-height: 65px;
}
.line-fields {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr 0.8fr;
  gap: 10px;
}
.line-fields label {
  margin: 10px 0 0;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.settings {
  max-width: 830px;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 22px;
}
.logo-placeholder {
  width: 140px;
  min-height: 90px;
  border: 1px dashed #bfb7bc;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--muted);
  padding: 15px;
}
.logo-placeholder img {
  max-width: 110px;
  max-height: 75px;
}
.logo-area label {
  margin: 0;
}
.logo-area input {
  font-size: 12px;
  border: 0;
  padding: 0;
}
.settings-sticky {
  position: sticky;
  bottom: 15px;
  background: #f7f6f2ed;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-intro {
  background: #eae5dd;
  padding: 60px 70px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-intro h1 {
  font-size: 56px;
  font-weight: 500;
  max-width: 400px;
  line-height: 1.08;
  margin-top: auto;
  margin-bottom: 25px;
}
.login-intro p {
  max-width: 310px;
  font-size: 15px;
  color: #6a6069;
  margin-bottom: auto;
}
.login-footer {
  font-size: 11px;
  color: #6a6069;
  margin-top: 40px;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form form {
  width: 100%;
  max-width: 350px;
}
.login-form h2 {
  font-size: 28px;
  margin-bottom: 10px;
}
.login-form p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 35px;
}
.login-form button {
  width: 100%;
  margin-top: 7px;
}
.login-form small {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 11px;
}
.login-art {
  height: 180px;
  position: relative;
  margin: 35px 0;
}
.mini-sheet {
  position: absolute;
  background: #faf9f6;
  border: 1px solid #d7d0c7;
  border-radius: 3px;
  width: 200px;
  height: 160px;
  left: 12%;
  top: 10px;
  transform: rotate(-7deg);
  padding: 23px;
  box-shadow: 5px 10px 25px #302b350c;
}
.mini-sheet:last-child {
  left: 36%;
  top: 0;
  transform: rotate(9deg);
}
.mini-sheet b {
  font-size: 13px;
}
.mini-sheet i {
  display: block;
  height: 5px;
  background: #e3ddd5;
  margin-top: 12px;
  width: 80%;
}
.mini-sheet i:last-child {
  width: 40%;
  background: #bd8268;
}
.error-text {
  color: #a02f28 !important;
  font-size: 13px;
  margin-top: 15px !important;
  margin-bottom: 0 !important;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 9px;
  box-shadow: 0 6px 24px #302b3525;
  padding: 15px 22px;
  font-size: 13px;
  max-width: 90vw;
  z-index: 10;
  display: none;
}
#notice.visible {
  display: block;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  max-width: 460px;
  width: calc(100% - 32px);
  color: var(--ink);
  box-shadow: 0 20px 80px #302b3525;
}
dialog::backdrop {
  background: #302b354d;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
}
.loading {
  padding: 60px;
  color: var(--muted);
}
.view-actions {
  margin: 22px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.view-paper {
  max-width: 760px;
  margin: 0 auto;
}
.view-paper .paper {
  padding: 55px;
  font-size: 13px;
}
.view-paper .paper h2 {
  font-size: 32px;
}
.view-paper .paper-footer {
  font-size: 11px;
}
.payment-form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-form label {
  margin: 0;
}
.payment-form input {
  max-width: 190px;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #c8c0c6;
  border-radius: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
@media (max-width: 1150px) {
  .main {
    padding: 28px;
  }
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 30px 16px;
  }
  .editor {
    grid-template-columns: 1fr;
  }
  .preview-wrap {
    position: static;
    max-width: 650px;
  }
  .login-intro {
    padding: 40px;
  }
  .login-intro h1 {
    font-size: 44px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .brand {
    font-size: 21px;
  }
  .brandmark {
    width: 28px;
    height: 30px;
    font-size: 21px;
  }
  .brand-sub,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    flex-direction: row;
    gap: 2px;
  }
  .nav button {
    font-size: 0;
    padding: 10px;
  }
  .nav svg {
    width: 20px;
    height: 20px;
  }
  .main {
    padding: 22px 18px 40px;
  }
  .topbar {
    margin-bottom: 28px;
    font-size: 10px;
  }
  .page-head {
    align-items: flex-start;
    gap: 12px;
  }
  h1 {
    font-size: 28px;
  }
  .page-head p {
    font-size: 12px;
  }
  .page-head > button {
    font-size: 11px;
    padding: 10px;
  }
  .page-head > button svg {
    display: none;
  }
  .stats {
    padding: 20px 0;
  }
  .stat {
    padding: 0 12px;
  }
  .stat strong {
    font-size: 21px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat small {
    font-size: 10px;
  }
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .search {
    max-width: none;
  }
  .tabs button {
    padding: 8px;
    font-size: 11px;
  }
  .notice-box {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .notice-box > .quiet {
    margin-left: 28px;
  }
  .notice-box p {
    min-width: 190px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .form-section {
    padding: 18px;
  }
  .line-fields {
    grid-template-columns: 1fr 1fr;
  }
  .paper {
    padding: 25px;
  }
  .view-paper .paper {
    padding: 25px;
  }
  .login {
    display: block;
  }
  .login-intro {
    padding: 25px 28px;
  }
  .login-intro h1 {
    font-size: 31px;
    margin: 30px 0 12px;
    max-width: 300px;
  }
  .login-intro p {
    font-size: 13px;
    margin: 0;
    max-width: 340px;
  }
  .login-art,
  .login-footer {
    display: none;
  }
  .login-form {
    padding: 40px 28px;
  }
  .login-form h2 {
    font-size: 25px;
  }
  .logo-area {
    flex-direction: column;
    align-items: flex-start;
  }
  .footnote {
    flex-direction: column;
  }
  .private {
    font-size: 0;
  }
  .private svg {
    width: 15px;
  }
  .empty {
    padding: 45px 20px;
  }
  .view-actions button {
    font-size: 12px;
  }
  .settings-sticky {
    bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
  border-radius: 8px;
  padding: 11px 17px;
  font-size: 13px;
  font-weight: 600;
}
a.button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}
a.button:hover {
  filter: brightness(0.93);
}
.preview-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 15px 5px;
}
.back {
  padding-left: 0;
  margin-bottom: 15px;
  font-size: 12px;
}
.logo-section {
  margin-top: 30px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.mobile-logout {
  display: none;
}
@media (max-width: 700px) {
  .mobile-logout {
    display: inline-flex;
  }
  .login-form small svg {
    width: 12px;
    height: 12px;
    vertical-align: middle;
  }
}
