:root {
  --ink: #17252c;
  --muted: #677780;
  --line: #dfe7e9;
  --paper: #f5f8f8;
  --teal: #106d68;
  --dark: #112e32;
  --pale: #e6f2ef;
  --amber: #8b5d10;
  --shadow: 0 5px 24px #102e3210;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e9a63c;
}
button {
  cursor: pointer;
}
a {
  color: var(--teal);
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -100px;
  left: 15px;
  z-index: 20;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 240px;
  background: var(--dark);
  color: #dce8e9;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1px;
  margin-bottom: 50px;
}
.brand small {
  display: block;
  font-size: 9px;
  color: #93acaf;
  letter-spacing: 1.5px;
  margin-top: 5px;
}
.mark {
  display: block;
  background: #ebf6f1;
  border-radius: 9px;
  color: var(--dark);
  font-size: 24px;
  letter-spacing: -2px;
  padding: 5px 8px;
  font-weight: 850;
}
.mark span {
  font-size: 20px;
  color: #188278;
  margin-left: 4px;
}
.nav-label {
  font-size: 10px;
  color: #8ba6a8;
  letter-spacing: 1.8px;
  margin: 0 14px 14px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #b7cdce;
  padding: 12px 14px;
  margin-bottom: 6px;
  text-decoration: none;
  border-radius: 7px;
  font-weight: 550;
}
nav a.active {
  background: #25464a;
  color: #fff;
}
nav a:hover {
  background: #244348;
}
.nav-icon {
  width: 21px;
  text-align: center;
  font-size: 17px;
  font-weight: 400;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid #345055;
  padding: 22px 8px 0;
  font-size: 11px;
  color: #b5cbcd;
}
.sidebar-foot p {
  color: #89a5a8;
  font-size: 11px;
  line-height: 1.8;
}
.status-dot {
  display: inline-block;
  background: #83c7ac;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 5px;
}
.quiet {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 3px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.workspace {
  margin-left: 240px;
}
.topbar {
  height: 78px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 15px;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
}
.crumb span {
  margin: 0 12px;
  color: #b4bfc4;
}
.crumb b {
  color: #35474e;
  font-weight: 550;
}
.top-right {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.avatar {
  background: var(--pale);
  color: var(--teal);
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
main {
  max-width: 1540px;
  margin: auto;
  padding: 36px 40px 65px;
}
h1 {
  font-size: 29px;
  font-weight: 650;
  letter-spacing: -0.9px;
  margin: 5px 0 8px;
  line-height: 1.2;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  font-weight: 650;
  margin: 0;
}
h3 {
  font-size: 14px;
  margin: 0;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--teal);
  font-weight: 750;
  text-transform: uppercase;
}
.sub {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.button,
button.primary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 9px 15px;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
}
.button.secondary,
button.secondary {
  background: #fff;
  color: #334b50;
  border: 1px solid #cfdcdf;
}
.button.small {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 11px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.icon-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 5px;
  padding: 5px 9px;
  color: #50636b;
}
.danger {
  color: #9c3c39 !important;
}
.hero {
  border: 1px solid #c7dfda;
  background: linear-gradient(110deg, #e8f3ef, #f4faf7);
  padding: 30px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  margin-bottom: 25px;
}
.hero h2 {
  font-size: 24px;
  line-height: 1.25;
  max-width: 520px;
  letter-spacing: -0.6px;
  margin: 10px 0;
}
.hero p {
  max-width: 530px;
  color: #5b7471;
  font-size: 13px;
  margin-bottom: 20px;
}
.hero-art {
  width: 240px;
  flex-shrink: 0;
  transform: rotate(-6deg);
  background: #fff;
  border: 1px solid #cddfdc;
  box-shadow: 10px 15px 0 #cfdfd840;
  border-radius: 8px;
  padding: 20px;
  align-self: center;
}
.hero-art strong {
  font-size: 11px;
}
.sheet-lines {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}
.sheet-lines i {
  height: 9px;
  background: #e4efec;
  border-radius: 2px;
}
.sheet-lines i:nth-child(3n) {
  background: #b9dbcf;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin: 20px 0 28px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.stat-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}
.stat-value {
  font-size: 26px;
  letter-spacing: -0.7px;
  font-weight: 600;
}
.stat small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 21px 23px;
  border-bottom: 1px solid #edf1f2;
}
.card-body {
  padding: 23px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th {
  text-align: left;
  background: #f8fafb;
  color: #71818a;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.4px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 15px;
  border-bottom: 1px solid #edf1f2;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
td small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  background: #edf1f4;
  color: #56646d;
  white-space: nowrap;
}
.pill.green {
  background: #e8f5ed;
  color: #2f7252;
}
.pill.amber {
  background: #fff3da;
  color: #906219;
}
.pill.blue {
  background: #eaf2fa;
  color: #466e94;
}
.empty {
  padding: 38px 23px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}
.empty strong {
  display: block;
  color: #354e53;
  margin-bottom: 8px;
}
.review-note {
  background: #fff8e8;
  border: 1px solid #edddb8;
  color: #785a25;
  padding: 15px 18px;
  border-radius: 7px;
  font-size: 12px;
  margin: 18px 0;
}
.review-note ul {
  padding-left: 20px;
  max-height: 230px;
  overflow: auto;
}
.review-note li {
  margin: 7px 0;
}
.review-note summary {
  font-weight: 650;
  cursor: pointer;
}
.search {
  max-width: 350px;
  min-width: 220px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin: 22px 0 25px;
  overflow: auto;
}
.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 11px 0;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}
.tab.active {
  border-bottom-color: var(--teal);
  color: var(--teal);
  font-weight: 650;
}
.source-ref {
  font:
    10px/1.4 ui-monospace,
    Consolas,
    monospace;
  color: #78908b;
  display: block;
  max-width: 250px;
  overflow-wrap: anywhere;
  margin-top: 4px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #4b6269;
  margin-bottom: 14px;
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
}
input,
select,
textarea {
  border: 1px solid #cedbdd;
  background: #fff;
  border-radius: 5px;
  padding: 9px 10px;
  color: var(--ink);
  min-height: 36px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  outline: 2px solid #106d6817;
}
textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.worksheet {
  min-width: 860px;
}
.worksheet th,
.worksheet td {
  padding: 10px 10px;
}
.worksheet input,
.worksheet select {
  min-width: 65px;
  max-width: 100%;
  width: 100%;
  padding: 8px;
  font-size: 12px;
}
.worksheet .description {
  min-width: 240px;
}
.worksheet .unit {
  min-width: 90px;
}
.worksheet .amount {
  min-width: 104px;
}
.worksheet .small-col {
  width: 76px;
  min-width: 76px;
}
.worksheet .row-total {
  min-width: 110px;
}
.section-controls {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #fafcfc;
}
.section-controls label {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  font-size: 10px;
}
.section-controls input {
  width: 95px;
  margin: 0;
}
.section-controls select {
  margin: 0;
}
.section-title {
  border: none;
  font-size: 16px;
  font-weight: 650;
  padding: 4px 0;
  width: 70%;
  min-width: 120px;
}
.section-title:focus {
  padding: 4px;
}
.save-bar {
  position: sticky;
  bottom: 15px;
  z-index: 3;
  background: #123a3d;
  color: #dcebea;
  border-radius: 8px;
  box-shadow: 0 8px 30px #102d3230;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.save-bar .button {
  background: #e1f1e9;
  color: #104940;
  border-color: #e1f1e9;
}
.save-bar small {
  font-size: 10px;
  color: #9bbab9;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 11px;
  font-weight: 400;
}
.check-label input {
  width: auto;
  min-height: auto;
  margin: 0;
}
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.sheet-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sheet-card h3 {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.sheet-card p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.sheet-card .actions {
  margin-top: auto;
}
.item-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.item-list li {
  padding: 16px 22px;
  border-bottom: 1px solid #edf1f2;
}
.item-list li:last-child {
  border-bottom: 0;
}
.item-list p {
  font-size: 12px;
  color: var(--muted);
  margin: 5px 0;
}
.muted {
  color: var(--muted);
}
.small-text {
  font-size: 11px;
}
.split-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.split-total:last-child {
  border: 0;
  font-weight: 650;
}
.top-space {
  margin-top: 20px;
}
.bottom-space {
  margin-bottom: 20px;
}
.message {
  padding: 15px 18px;
  background: #f0f5f5;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  white-space: pre-wrap;
}
.message.reply {
  background: #e5f1eb;
}
.message small {
  display: block;
  font-size: 10px;
  color: #6c8580;
  margin-bottom: 4px;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.photo-grid img {
  width: 150px;
  height: 110px;
  object-fit: cover;
  border-radius: 5px;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 25px;
  background: linear-gradient(130deg, #113437, #245951);
}
.auth-card {
  background: white;
  border-radius: 12px;
  padding: 38px;
  width: min(440px, 100%);
  box-shadow: 0 20px 70px #0003;
}
.auth-card .mark {
  width: fit-content;
  margin-bottom: 22px;
}
.auth-card h1 {
  font-size: 26px;
}
.auth-card form {
  margin-top: 25px;
}
.auth-card .button {
  width: 100%;
}
.auth-card p {
  font-size: 12px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #153d38;
  color: white;
  padding: 13px 22px;
  border-radius: 7px;
  box-shadow: 0 5px 25px #0002;
  z-index: 30;
  max-width: min(90vw, 600px);
}
#toast.error {
  background: #813833;
}
dialog {
  border: 0;
  border-radius: 10px;
  padding: 28px;
  max-width: min(960px, 95vw);
  width: 600px;
  max-height: 90vh;
  box-shadow: 0 20px 70px #0003;
}
dialog::backdrop {
  background: #142e3b77;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.raw-table {
  max-height: 350px;
  overflow: auto;
  border: 1px solid var(--line);
  margin: 20px 0;
}
.raw-table td {
  min-width: 95px;
  font-size: 10px;
  max-width: 220px;
  overflow-wrap: anywhere;
}
.error-line {
  color: #9a3434;
  font-size: 12px;
  min-height: 18px;
}
.auth-help {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 23px;
}
#menu {
  display: none;
}
.print-page {
  background: white;
  max-width: 850px;
  margin: 30px auto;
  padding: 30px;
}
.print-page header {
  display: flex;
  justify-content: space-between;
  border-bottom: 3px solid var(--teal);
  padding-bottom: 25px;
  margin-bottom: 30px;
}
.print-scope {
  white-space: pre-wrap;
  line-height: 1.8;
}
.quote-total {
  margin: 35px 0 35px auto;
  max-width: 320px;
}
.nowrap {
  white-space: nowrap;
}
@media (min-width: 1550px) {
  main {
    padding-top: 45px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 215px;
    padding: 26px 15px;
  }
  .workspace {
    margin-left: 215px;
  }
  main {
    padding: 28px 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat-value {
    font-size: 23px;
  }
  .sheet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 850px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    width: 240px;
  }
  .sidebar.open {
    transform: none;
  }
  .workspace {
    margin-left: 0;
  }
  #menu {
    display: block;
  }
  .topbar {
    height: 65px;
    padding: 0 18px;
  }
  .top-right #today {
    display: none;
  }
  .crumb {
    margin-right: auto;
  }
  .hero-art {
    display: none;
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  main {
    padding: 25px 18px;
  }
  .heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 26px;
  }
  .tabs {
    gap: 20px;
  }
  .save-bar {
    bottom: 6px;
    padding: 12px;
  }
  .sheet-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-head,
  .card-body {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
}
@media (max-width: 500px) {
  .sheet-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 22px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .topbar .crumb {
    font-size: 10px;
  }
  .crumb span {
    margin: 0 7px;
  }
  .stat-value {
    font-size: 23px;
  }
  .actions {
    gap: 7px;
  }
  .button {
    padding: 9px 12px;
  }
  .search {
    width: 100%;
    max-width: none;
  }
  .auth-card {
    padding: 28px;
  }
  .save-bar {
    flex-wrap: wrap;
  }
  .section-controls {
    align-items: flex-start;
    gap: 12px;
  }
  dialog {
    padding: 22px;
  }
  .print-page {
    padding: 18px;
  }
}
@media print {
  .no-print {
    display: none !important;
  }
  .print-page {
    margin: 0;
    padding: 10px;
  }
  body {
    background: white;
  }
  .review-note {
    background: white;
    color: black;
    border: 1px solid #999;
  }
}
