:root {
  --ink: #132e27;
  --green: #174d3f;
  --pine: #123d32;
  --mint: #d9f37e;
  --paper: #f6f7f2;
  --line: #d9dfd5;
  --muted: #52665b;
  --alert: #923f38;
  --radius: 14px;
  font:
    16px/1.5 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #769e23;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.07;
  letter-spacing: -0.06em;
  font-weight: 650;
}
h2 {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
h3 {
  font-size: 1.05rem;
}
small,
.muted {
  color: var(--muted);
}
.loading {
  padding: 32px;
}
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.2rem;
  font-weight: 740;
  letter-spacing: -0.055em;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--mint);
  color: var(--pine);
}
.brandmark svg {
  width: 25px;
  height: 25px;
}
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.96fr) 1.04fr;
}
.brand-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100%;
  background: #143e33;
  color: #f4f6e9;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 5vw, 85px);
}
.brand-panel:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(160deg, transparent 20%, #205644 115%);
}
.brand-panel .logo {
  font-size: 1.38rem;
}
.brand-art {
  position: relative;
  width: min(100%, 420px);
  height: 300px;
  margin: auto;
  display: grid;
  place-items: center;
}
.brand-art:before {
  content: "";
  position: absolute;
  left: 8%;
  top: 16%;
  width: 83%;
  height: 72%;
  border-radius: 50%;
  border: 1px solid #a9cb9066;
  transform: rotate(-30deg);
  box-shadow:
    0 0 0 22px #a9cb900b,
    0 0 0 44px #a9cb9007;
}
.paper-slip {
  width: 175px;
  background: #f3f4df;
  color: #244a39;
  padding: 24px 18px 28px;
  text-align: center;
  transform: rotate(-12deg);
  box-shadow: 14px 18px 0 #09291e4d;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 97%,
    95% 100%,
    90% 97%,
    85% 100%,
    80% 97%,
    75% 100%,
    70% 97%,
    65% 100%,
    60% 97%,
    55% 100%,
    50% 97%,
    45% 100%,
    40% 97%,
    35% 100%,
    30% 97%,
    25% 100%,
    20% 97%,
    15% 100%,
    10% 97%,
    5% 100%,
    0 97%
  );
}
.paper-slip .brandmark {
  margin: 0 auto 12px;
  background: var(--pine);
  color: var(--mint);
}
.slipline {
  display: block;
  height: 3px;
  background: #a6b2a0;
  margin: 9px 0;
}
.dots {
  height: 12px;
  border-block: 2px dotted #788f79;
  margin: 14px 0;
}
.barcode {
  height: 24px;
  background: repeating-linear-gradient(
    90deg,
    #264735 0 1px,
    transparent 1px 3px,
    #264735 3px 6px,
    transparent 6px 8px
  );
}
.sale-tag {
  position: absolute;
  right: 11%;
  bottom: 18%;
  border-radius: 15px;
  transform: rotate(9deg);
  background: var(--mint);
  color: var(--pine);
  padding: 13px 16px;
  font-weight: 750;
  box-shadow: 0 9px 20px #123c3280;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-title {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.97;
  letter-spacing: -0.08em;
  font-weight: 620;
}
.brand-title span {
  color: var(--mint);
}
.brand-meta {
  margin-top: 24px;
  color: #d2dfcf;
  font-size: 0.88rem;
}
.auth-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 28px;
  background: #fbfcf7;
}
.auth-box {
  width: min(100%, 385px);
}
.auth-box h1 {
  margin: 0.55rem 0 0.4rem;
}
.auth-box form {
  margin-top: 1.65rem;
}
.auth-box .submit {
  width: 100%;
}
.field {
  display: grid;
  align-content: start;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 620;
}
.field input,
.field select,
.field textarea,
.searchbox input,
.filter {
  width: 100%;
  background: white;
  color: var(--ink);
  border: 1px solid #b9c7bb;
  border-radius: 9px;
  padding: 11px 12px;
  outline-offset: 2px;
  min-height: 44px;
  font-weight: 400;
}
.field textarea {
  resize: vertical;
}
.field input[readonly] {
  background: #f4f6f0;
}
.field input[type="checkbox"] {
  min-height: initial;
  width: auto;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
}
.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
}
.stack {
  display: grid;
  gap: 15px;
}
.btn,
.secondary,
.danger,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  font-size: 0.92rem;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 9px;
  text-decoration: none;
}
.btn {
  background: var(--green);
  color: white;
}
.btn:hover {
  background: #103a2f;
}
.secondary,
.ghost {
  background: white;
  color: var(--green);
  border: 1px solid var(--line);
}
.secondary:hover,
.ghost:hover {
  background: #edf3e7;
}
.danger {
  color: #862a25;
  background: #fbeeea;
}
.text-btn {
  padding: 5px 0;
  color: var(--green);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.error {
  background: #fcedea;
  border: 1px solid #e6c7bd;
  color: #852c25;
  padding: 9px 12px;
  border-radius: 8px;
}
.error:empty {
  display: none;
}
.creds {
  overflow-wrap: anywhere;
  font-family: monospace;
  background: #f3f6ea;
  padding: 0.65rem;
  margin: 0.4rem 0;
  font-size: 1rem;
  user-select: all;
}
.shell {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--pine);
  color: #f3f5e9;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 18px;
  position: sticky;
  height: 100vh;
  top: 0;
  z-index: 2;
}
.sidebar .logo {
  padding: 3px 10px 30px;
}
.nav {
  display: grid;
  gap: 4px;
}
.nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 11px 15px;
  border-radius: 9px;
  color: #d3ded4;
  font-size: 0.93rem;
  font-weight: 540;
}
.nav button.active {
  color: #173e32;
  background: var(--mint);
  font-weight: 680;
}
.nav button:hover:not(.active) {
  background: #ffffff13;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid #ffffff30;
  padding: 20px 5px 0;
}
.account strong,
.account small {
  display: block;
}
.account small {
  color: #cddecb;
  font-size: 0.8rem;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c8daab;
  color: var(--pine);
  font-weight: 720;
}
.iconbtn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  flex: none;
}
.iconbtn:hover {
  background: #879b8d26;
}
.account .iconbtn {
  margin-left: auto;
}
.mobile {
  display: none;
}
.content {
  min-width: 0;
  padding: clamp(24px, 4vw, 64px);
  max-width: 1600px;
  width: 100%;
  margin-inline: auto;
}
.topbar,
.row,
.head,
.sectionhead,
.actions,
.spread {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar,
.head,
.sectionhead,
.spread {
  justify-content: space-between;
}
.topbar {
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  color: var(--muted);
  font-size: 0.88rem;
}
.head {
  margin: 28px 0 23px;
  align-items: flex-end;
}
.head h1 {
  font-size: clamp(2rem, 3.4vw, 3.25rem);
}
.sectionhead {
  margin-bottom: 16px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(17px, 2vw, 28px);
  min-width: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 15px;
  margin: 0 0 22px;
}
.card {
  min-height: 125px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 21px;
  display: grid;
  align-content: space-between;
  gap: 16px;
}
.card small {
  font-size: 0.9rem;
}
.card strong {
  font-size: clamp(1.3rem, 2.3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.06em;
}
.card.feature {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.card.feature small {
  color: #d0e4cf;
}
.card.feature .icon {
  color: var(--mint);
}
.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 23px;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-width: 0;
  flex: 1;
}
.searchbox .icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
}
.searchbox input {
  padding-left: 39px;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}
.toolbar .filter {
  width: auto;
  max-width: 100%;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}
th,
td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid #e4e8e0;
  vertical-align: middle;
}
thead th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.namepair {
  display: grid;
  gap: 2px;
  justify-items: start;
}
.en,
.dv {
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}
.dv,
[lang="dv"] {
  font-family: Thaana, "Noto Sans Thaana", "MV Boli", sans-serif;
  line-height: 1.8;
}
.namepair bdi {
  max-width: 100%;
}
.namepair .dv:not(:only-child) {
  color: var(--muted);
}
.tag {
  display: inline-flex;
  border-radius: 99px;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 620;
  background: #edf4df;
  color: #385127;
  white-space: nowrap;
}
.tag.dim {
  background: #eeeeea;
  color: #667065;
}
.tag.red {
  background: #f8ede7;
  color: #854131;
}
.empty {
  padding: 35px 12px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  width: 27px;
  height: 27px;
}
.checkout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  gap: 17px;
  align-items: start;
}
.productrow,
.cartline,
.staffline,
.summaryline {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.productrow:last-child,
.cartline:last-child,
.staffline:last-child {
  border-bottom: 0;
}
.productrow > div:first-of-type,
.cartline > div:first-child,
.staffline > div:first-of-type {
  flex: 1;
  min-width: 0;
}
.productrow small,
.cartline small,
.staffline small {
  display: block;
}
.qty {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.qty button {
  height: 36px;
  width: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.summaryline {
  justify-content: space-between;
}
.summaryline.total {
  font-size: 1.15rem;
  font-weight: 700;
  border: 0;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
.full {
  grid-column: 1/-1;
}
.wrap {
  flex-wrap: wrap;
}
.flow > * + * {
  margin-top: 18px;
}
.compact {
  font-size: 0.89rem;
}
.permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sectionline {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.previewimg {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
}
dialog {
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  width: min(610px, calc(100% - 24px));
  max-height: 92dvh;
}
dialog::backdrop {
  background: #102d225c;
}
dialog .modal {
  padding: 24px;
}
dialog h2 {
  font-size: 1.5rem;
}
.modalhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modalfoot {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 15px;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pine);
  color: white;
  border-radius: 10px;
  padding: 10px 16px;
  z-index: 15;
  box-shadow: 0 4px 16px #0002;
}
#toast:empty,
#print {
  display: none;
}
.detailgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detailgrid dt {
  font-size: 0.8rem;
  color: var(--muted);
}
.detailgrid dd {
  margin: 2px 0;
  overflow-wrap: anywhere;
}
.sub {
  margin-top: 6px;
  color: var(--muted);
}
.sectionhead .actions {
  flex-wrap: wrap;
}
.w100 {
  width: 100%;
}
.tiny {
  font-size: 0.8rem;
}
.bottomgap {
  margin-bottom: 15px;
}
.nowrap {
  white-space: nowrap;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.receipt-head {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.receipt-head small {
  display: block;
}
.filter-date {
  min-width: 135px;
}
.signout {
  color: inherit;
}
.settabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.settabs button[aria-selected="true"] {
  background: var(--green);
  color: white;
}
@media (max-width: 1060px) {
  .shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .content {
    padding: 25px;
  }
  .sidebar {
    padding-inline: 10px;
  }
  .checkout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  }
}
@media (max-width: 820px) {
  .checkout {
    grid-template-columns: 1fr;
  }
  .auth {
    grid-template-columns: minmax(270px, 0.8fr) 1fr;
  }
  .brand-panel {
    padding: 36px 26px;
  }
  .sale-tag {
    right: 0;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.16s;
  }
  .shell.open .sidebar {
    transform: none;
  }
  .shell.open:before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    background: #193c2f5e;
  }
  .mobile {
    display: inline-flex;
  }
  .topbar > .row {
    gap: 8px;
  }
  .content {
    padding: 15px 20px 32px;
  }
  .mobile-icon {
    display: inline-grid;
  }
  .sidebar .logo {
    padding-top: 6px;
  }
  .head {
    margin: 23px 0 17px;
  }
}
@media (max-width: 610px) {
  .auth {
    display: block;
  }
  .brand-panel {
    min-height: 0;
    display: block;
    padding: 22px;
  }
  .brand-art,
  .brand-title,
  .brand-meta {
    display: none;
  }
  .auth-side {
    min-height: calc(100dvh - 82px);
    align-items: flex-start;
    padding: clamp(35px, 10vh, 80px) 24px;
  }
  .auth-box {
    max-width: 400px;
  }
  .content {
    padding-inline: 14px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .card {
    min-height: 104px;
    padding: 14px;
  }
  .card strong {
    font-size: 1.25rem;
  }
  .head {
    align-items: center;
  }
  .actions {
    gap: 6px;
  }
  .toolbar .searchbox {
    flex: 1 0 100%;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .panel {
    padding: 15px;
  }
  .head > .btn,
  .head > .secondary {
    padding: 9px 11px;
  }
  .brand-panel .logo {
    font-size: 1.15rem;
  }
  .detailgrid {
    gap: 7px;
  }
  .card .icon {
    width: 17px;
  }
  .topbar {
    padding-bottom: 9px;
  }
  .topbar time {
    font-size: 0.77rem;
  }
  .auth-links {
    gap: 11px;
  }
  .tiny {
    font-size: 0.8rem;
  }
  .cartline {
    flex-wrap: wrap;
  }
  .quick .secondary {
    font-size: 0.84rem;
  }
  .modal .row {
    flex-wrap: wrap;
  }
  dialog .modal {
    padding: 17px;
  }
  .toolbar .filter {
    flex: 1;
  }
}
@media print {
  @page {
    margin: 15mm;
  }
  body {
    background: white;
    color: black;
    font-size: 11pt;
  }
  #app,
  dialog,
  #toast {
    display: none !important;
  }
  #print {
    display: block;
  }
  #print table {
    font-size: 10pt;
  }
  #print tr {
    break-inside: avoid;
  }
  #print > * {
    margin-bottom: 8px;
  }
  .panel {
    border: 0;
  }
  #print .icon,
  #print button {
    display: none;
  }
  .summaryline {
    padding: 6px 0;
  }
  dialog::backdrop {
    display: none;
    background: transparent;
  }
}
@font-face {
  font-family: Thaana;
  src: url("/thaana.ttf") format("truetype");
  font-display: swap;
}
.namepair bdi {
  white-space: pre-wrap;
}
.share-row > .field {
  min-width: 0;
}
.share-row > .field:first-child {
  flex: 1;
}
.share-row > .field:nth-child(2) {
  max-width: 96px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px;
}
fieldset legend {
  font-weight: 620;
  font-size: 0.9rem;
}
.auth-box [name="otp"] {
  font-variant-numeric: tabular-nums;
}
