.keli-account-bar {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 0 0 14px;
  padding: 6px;
  border: 1px solid rgba(36, 35, 31, .12);
  border-radius: 10px;
  background: rgba(255, 253, 247, .92);
  box-shadow: 0 8px 24px rgba(24, 24, 20, .12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.keli-account-bar button,
.keli-modal button,
.keli-orders-panel button {
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  background: #fffdf7;
  color: #24231f;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.keli-account-bar button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}

.keli-account-bar button.primary,
.keli-modal button.primary,
.keli-orders-panel button.primary {
  border-color: #6aa88f;
  background: #6aa88f;
  color: #082018;
}

.keli-account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 6px;
  color: #777267;
  font-size: 13px;
  font-weight: 800;
}

.keli-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 17, 15, .58);
}

.keli-overlay[hidden],
.keli-orders-panel[hidden],
.keli-modal [hidden] {
  display: none !important;
}

.keli-modal,
.keli-orders-panel {
  width: min(440px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
  overflow: auto;
  border: 1px solid #ddd8cc;
  border-radius: 12px;
  background: #fffdf7;
  color: #24231f;
  box-shadow: 0 22px 70px rgba(24, 24, 20, .28);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.keli-modal {
  padding: 24px;
}

.keli-modal h2,
.keli-orders-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.keli-modal p {
  margin: 8px 0 18px;
  color: #777267;
  line-height: 1.45;
}

.keli-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid #ddd8cc;
  border-radius: 10px;
  background: #f0eee7;
}

.keli-auth-tabs button {
  border: 0;
  background: transparent;
  min-height: 38px;
}

.keli-auth-tabs button.active {
  background: #6aa88f;
  color: #082018;
}

.keli-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.keli-field label {
  color: #777267;
  font-size: 13px;
  font-weight: 800;
}

.keli-field input {
  width: 100%;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  background: #f0eee7;
  color: #24231f;
  padding: 11px 12px;
  font: inherit;
}

.keli-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.keli-modal-actions button,
.keli-orders-panel button {
  min-height: 40px;
  padding: 9px 13px;
}

.keli-error {
  margin-top: 12px;
  color: #b42318;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.keli-orders-panel {
  position: fixed;
  top: 68px;
  right: 14px;
  z-index: 110;
  width: min(520px, calc(100vw - 28px));
}

.keli-orders-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #ddd8cc;
  background: #fffdf7;
}

.keli-orders-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.keli-order-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  background: #f0eee7;
}

.keli-order-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.keli-order-meta,
.keli-order-sub {
  color: #777267;
  font-size: 13px;
  line-height: 1.45;
}

.keli-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.keli-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid #ddd8cc;
  border-radius: 999px;
  background: #fffdf7;
  color: #777267;
  font-size: 12px;
  font-weight: 900;
}

.keli-badge.paid {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.keli-badge.waiting {
  border-color: #fed7aa;
  background: #ffedd5;
  color: #9a3412;
}

.keli-empty {
  padding: 22px;
  color: #777267;
  text-align: center;
  line-height: 1.45;
}

.keli-shipping-options[hidden],
.keli-shipping-summary[hidden],
.keli-shipping-error[hidden] {
  display: none !important;
}

.keli-shipping-card {
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid rgba(36, 35, 31, .14);
  border-radius: 8px;
  background: rgba(255, 253, 247, .9);
  color: #24231f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.keli-shipping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.keli-shipping-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.keli-shipping-field span,
.keli-shipping-title {
  color: #777267;
  font-size: 12px;
  font-weight: 900;
}

.keli-shipping-field select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  background: #fffdf7;
  color: #24231f;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}

.keli-shipping-field select:disabled {
  opacity: .55;
}

.keli-shipping-options {
  display: grid;
  gap: 8px;
}

.keli-shipping-list {
  display: grid;
  gap: 8px;
}

.keli-shipping-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ddd8cc;
  border-radius: 8px;
  background: #f0eee7;
  cursor: pointer;
}

.keli-shipping-option:has(input:checked) {
  border-color: #6aa88f;
  background: #e7f3ee;
}

.keli-shipping-option b,
.keli-shipping-option small,
.keli-shipping-option strong {
  display: block;
  overflow-wrap: anywhere;
}

.keli-shipping-option small,
.keli-shipping-empty,
.keli-shipping-loading {
  color: #777267;
  font-size: 12px;
  line-height: 1.35;
}

.keli-shipping-option strong {
  font-size: 13px;
}

.keli-shipping-summary {
  display: grid;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid #ddd8cc;
}

.keli-shipping-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.keli-shipping-summary span {
  color: #777267;
}

.keli-shipping-error {
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .keli-account-bar {
    margin-bottom: 12px;
  }

  .keli-orders-panel {
    top: 10px;
    right: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .keli-account-name {
    display: none;
  }

  .keli-shipping-grid {
    grid-template-columns: 1fr;
  }
}
