:root {
  --text-secondary: #383838 !important;
  --bg-secondary: #c0c0c0;
  --text-primary: #1a1a1a;
  --bg-primary: #fff;
  font-family: robot, Sans-Serif;
  color-scheme: light dark;
  user-select: none;
}

@font-face {
  font-family: robot;
  src: url("/ont.woff") format("woff");
}

body.dark-mode {
  --bg-primary: #1a1a1a;
  --bg-secondary: #383838 !important;
  --text-primary: #fff;
  --text-secondary: #c0c0c0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  forced-color-adjust: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

#form {
  display: flex;
  /*flex*/
  justify-content: center;
  align-items: center;
  position: relative;
  height: 100dvh;
  background: url("/bg.jpg") no-repeat center;
  color: #fff;

  input {
    background: transparent;
    color: #fff;
  }

  .icon {
    position: absolute;
    right: 5%;
    top: 50%;
    translate: 0% -50%;
  }
}

.login {
  display: flex;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border: 2px solid var(--text-secondary);
  border-radius: 16px;

  label {
    font-size: 2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -120% -50%;
    transition: .5s .2s;
  }

  input {
    border: 1px solid gray;
    font-size: 2rem;
    width: 340px;
    padding: 16px;
    border-radius: 16px;

    &:focus+label,
    &:valid+label {
      font-size: 1.5rem;
      translate: -130% -175%;
      backdrop-filter: blur(8px);
    }

    &:focus {
      outline: none;
    }
  }
}

.login-foot {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.username-box,
.password-box {
  position: relative;
  margin: 16px 0;
}

#app {
  display: grid;
  /*grid*/
  height: 100dvh;
  position: relative;
  grid-template-rows: 100px auto auto;
  width: 100vw;
  background: url(/bg.jpg) center no-repeat;

  header {
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 4px;

    h1 {
      text-align: center;
      font-size: 2.5rem;
    }
  }

  .display {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    position: relative;
    min-height: 720px;
    background: var(--bg-secondary);
  }

  .footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg-secondary);
    margin-top: 4px;
  }
}

.display-header {
  padding: 8px;

  p {
    width: max-content;
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;

    &::after {
      content: "";
      width: 100%;
      height: 2px;
      position: absolute;
      background: var(--text-primary);
      left: 0;
      bottom: 0;
      background: conic-radient(45deg, red blue);
    }
  }
}

.display-container {
  overflow-y: auto;
}

.display-item {
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  margin: 8px;
  border-radius: 8px;
  border-bottom: 2px solid var(--text-primary);

  p {
    font-size: 1.4rem;
  }

  .detail {
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin: 4px 0;

    p {
      font-size: 1rem;
      font-weight: 600;
    }
  }
}

.display-input {
  padding: 8px;
  flex-direction: column;
  row-gap: 4px;
  display: flex;
  transition: 0.5s 0.2s;
  left: -500px;
  bottom: 150px;
  background: var(--bg-secondary);
  position: absolute;

  .qty {
    font-size: 1.5rem;
    display: flex;
    justify-content: space-around;
    padding: 8px;

    span {
      background: var(--bg-primary);
      display: flex;
      width: 32px;
      height: 32px;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
    }
  }

  input {
    border-bottom: 2px solid var(--text-secondary);
  }

  button {
    flex-grow: 1;
    font-size: 1.8rem;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    background: var(--bg-primary);
  }
}

input {
  font-size: 1.5rem;
  padding: 8px;
  border-radius: 8px;
  border: none;
  width: 280px;
  background: var(--bg-primary);

  &:focus {
    outline: none;
  }
}

.display-total {
  padding: 8px;
  position: absolute;
  right: 0;
  bottom: 0;

  p {
    font-size: 1.3rem;
    font-weight: bold;
  }
}

.link {
  text-decoration: none;
  color: #000;
  padding: 4px;
  border-radius: 15%;
  display: flex;
  justify-content: center;
  transition: 0.5s 0.2s;

  &:hover {
    transform: scale(1.2);
  }
}

.menu {
  padding: 12px;
  display: flex;
  flex-direction: row-reverse;
  background: var(--bg-secondary);
  border-radius: 16px;
  position: relative;
  gap: 16px;
}

.menu-box {
  display: flex;
  gap: 16px;
}

.kosong {
  border: none;
  font-size: 2rem;
  text-align: center;
}

.no-display {
  display: none;
}

#back {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 4px;
}

.payment-done {
  width: 100%;
  background: #71e971;
  margin-top: 8px;
}

.checkout-modal {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}

.payment-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  padding: 8px;
  position: relative;
}

.payment-summary {
  width: 90%;
  background: var(--bg-primary);
  display: none;
  position: absolute;
  padding: 16px;
  border-radius: 16px;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}

.receipt {
  width: 100%;

  .display-item {
    border: none;
    padding: 0;
    margin: 0;
  }

  .detail span,
  .detail p,
  p {
    font-weight: normal;
    font-size: 1.25rem;
  }
}

.header-summary {
  text-align: center;
}

.footer-summary {
  text-align: right;
  font-size: 1.25rem;
}

.checkout {
  background: greenyellow;
  color: black;
  transition: 0.5s;
}

.checkout:disabled {
  background: red;
  color: white;
  opacity: 0.7;
}

.checkout-head {
  width: 100%;
  display: flex;
  justify-content: space-between;

  .checkout-header {
    font-size: 3rem;
    padding: 8px;
  }
}

.payment-control {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  translate: -50% -50%;
  border-radius: 24px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: transparent;
  row-gap: 8px;
  padding: 8px;

  button {
    padding: 4px 8px;
    background: var(--bg-primary);
    width: 150px;
    text-align: center;
  }
}

button {
  border-radius: 8px;
  font-size: 1.8rem;
  font-weight: bold;
  color: black;
  padding: 12px 24px;
  background: var(--bg-primary);
  border: none;
  cursor: pointer;

  &:disabled {
    cursor: not-allowed;
    background: #000;
    color: white;
    opacity: 0.7;
  }
}

.cash {
  display: none;
  width: 100%;
  text-align: right;

  h2 {
    font-size: 1.8rem;
  }

  .cash-done {
    margin-left: 0;
  }
}

.qris {
  display: none;
  text-align: center;

  img {
    width: 100%;
  }
}

.input-quick {
  display: grid;
  margin-top: 16px;
  width: 100%;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;

  button {
    background: var(--bg-secondary);
    border: none;
  }
}

.input-container {
  gap: 8px;
  margin-top: 8px;
  grid-template-columns: repeat(4, 1fr);

  button {
    border: none;
    background: var(--bg-secondary);
  }
}

.payment-end {
  margin-top: 16px;
  width: 100%;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}