* {
  box-sizing: border-box;
}

html {
  background: #eef2f6;
  min-height: 100%;
}

body.ako-pos-page {
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(238,242,246,.96)),
    #eef2f6;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ako-pos-login-page {
  align-items: center;
  display: flex;
  justify-content: center;
}

.ako-pos-login-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  width: 100%;
}

.ako-pos-login-panel {
  background: #fff;
  border: 1px solid #dde5ef;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .16);
  max-width: 420px;
  padding: 28px;
  width: 100%;
}

.ako-pos-login-brand,
.ako-pos-brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.ako-pos-login-brand > span,
.ako-pos-brand > span {
  align-items: center;
  background: var(--ako-pos-brand, #101820);
  border-radius: 8px;
  color: #fff;
  display: flex;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.ako-pos-login-brand h1,
.ako-pos-brand h1 {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.ako-pos-login-brand p,
.ako-pos-brand p {
  color: #64748b;
  font-size: 13px;
  margin: 4px 0 0;
}

.ako-pos-alert,
.ako-pos-message {
  border-radius: 8px;
  font-weight: 700;
  margin-top: 16px;
  padding: 12px;
}

.ako-pos-alert,
.ako-pos-message.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.ako-pos-message.is-success {
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  color: #115e59;
}

.ako-pos-login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.ako-pos-login-form label {
  display: grid;
  gap: 7px;
}

.ako-pos-login-form span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.ako-pos-login-form input,
.ako-pos-search input,
.ako-pos-field-grid input,
.ako-pos-panel textarea {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  outline: none;
  padding: 12px 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}

.ako-pos-login-form input:focus,
.ako-pos-search input:focus,
.ako-pos-field-grid input:focus,
.ako-pos-panel textarea:focus {
  border-color: var(--ako-pos-accent, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .14);
}

.ako-pos-login-form button,
.ako-pos-complete {
  background: var(--ako-pos-accent, #0f766e);
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  min-height: 46px;
  padding: 12px 16px;
}

.ako-pos-login-form button:hover,
.ako-pos-complete:hover {
  filter: brightness(.96);
}

.ako-pos-shell {
  display: grid;
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

.ako-pos-topbar {
  align-items: center;
  background: rgba(255,255,255,.94);
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15,23,42,.08);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 14px 18px;
}

.ako-pos-operator {
  align-items: center;
  display: flex;
  gap: 10px;
}

.ako-pos-operator span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ako-pos-operator strong {
  color: #0f172a;
}

.ako-pos-operator a {
  background: #f1f5f9;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
}

.ako-pos-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: 0;
}

.ako-pos-products,
.ako-pos-checkout {
  min-width: 0;
}

.ako-pos-search {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15,23,42,.06);
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
}

.ako-pos-search small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.ako-pos-products-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.ako-pos-product {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15,23,42,.06);
  display: grid;
  gap: 10px;
  padding: 12px;
  text-align: left;
}

.ako-pos-product:hover {
  border-color: #7dd3fc;
  box-shadow: 0 18px 42px rgba(15,23,42,.1);
}

.ako-pos-product img {
  aspect-ratio: 1;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  object-fit: cover;
  width: 100%;
}

.ako-pos-product h3 {
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
  min-height: 38px;
}

.ako-pos-product-meta {
  color: #64748b;
  display: grid;
  font-size: 12px;
  gap: 3px;
}

.ako-pos-product-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ako-pos-price {
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.ako-pos-stock {
  background: #e0f2fe;
  border-radius: 999px;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 8px;
}

.ako-pos-stock.is-low {
  background: #fff7ed;
  color: #9a3412;
}

.ako-pos-stock.is-out {
  background: #fee2e2;
  color: #991b1b;
}

.ako-pos-checkout {
  display: grid;
  gap: 14px;
  grid-auto-rows: min-content;
}

.ako-pos-panel {
  background: #fff;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15,23,42,.06);
  padding: 14px;
}

.ako-pos-panel h2,
.ako-pos-panel-head h2 {
  color: #111827;
  font-size: 16px;
  line-height: 1.2;
  margin: 0;
}

.ako-pos-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ako-pos-panel-head span {
  align-items: center;
  background: #ecfdf5;
  border-radius: 999px;
  color: #0f766e;
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 9px;
}

.ako-pos-cart-items {
  display: grid;
  gap: 10px;
  max-height: 34vh;
  overflow: auto;
  padding-right: 2px;
}

.ako-pos-cart-empty,
.ako-pos-empty {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  display: flex;
  font-weight: 800;
  justify-content: center;
  min-height: 98px;
  padding: 16px;
  text-align: center;
}

.ako-pos-cart-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.ako-pos-cart-item h3 {
  color: #0f172a;
  font-size: 14px;
  margin: 0;
}

.ako-pos-cart-line {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.ako-pos-stepper {
  align-items: center;
  display: flex;
  gap: 6px;
}

.ako-pos-stepper button,
.ako-pos-remove {
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #334155;
  display: flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  min-width: 32px;
}

.ako-pos-stepper span {
  font-weight: 900;
  min-width: 22px;
  text-align: center;
}

.ako-pos-cart-item-total {
  color: #0f172a;
  font-weight: 900;
}

.ako-pos-total-row {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 14px;
}

.ako-pos-total-row span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.ako-pos-total-row strong {
  color: #0f172a;
  font-size: 24px;
}

.ako-pos-field-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ako-pos-segmented {
  background: #f1f5f9;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 12px 0;
  padding: 4px;
}

.ako-pos-segmented button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
  min-height: 38px;
  padding: 8px;
}

.ako-pos-segmented button.is-active {
  background: #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
  color: #0f172a;
}

.ako-pos-panel textarea {
  display: block;
  margin-bottom: 12px;
  resize: vertical;
}

.ako-pos-complete {
  width: 100%;
}

.ako-pos-complete:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.ako-pos-message:empty {
  display: none;
}

.ako-pos-recent-sales {
  display: grid;
  gap: 8px;
}

.ako-pos-recent-sale {
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.ako-pos-recent-sale strong {
  color: #0f172a;
  display: block;
  font-size: 13px;
}

.ako-pos-recent-sale span {
  color: #64748b;
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

@media (max-width: 1120px) {
  .ako-pos-layout {
    grid-template-columns: 1fr;
  }

  .ako-pos-checkout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ako-pos-cart-panel {
    grid-row: span 2;
  }
}

@media (max-width: 760px) {
  .ako-pos-shell {
    padding: 10px;
  }

  .ako-pos-topbar,
  .ako-pos-operator {
    align-items: flex-start;
    flex-direction: column;
  }

  .ako-pos-checkout {
    grid-template-columns: 1fr;
  }

  .ako-pos-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ako-pos-product h3 {
    font-size: 13px;
    min-height: 34px;
  }

  .ako-pos-segmented {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .ako-pos-products-grid {
    grid-template-columns: 1fr;
  }
}
