* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; 
  user-select: none;
  -webkit-touch-callout: none; 
  -webkit-tap-highlight-color: transparent;
}

input { 
  -webkit-user-select: text; 
  user-select: text; 
}

body { 
  background: #0f172a; 
  color: #f8fafc; 
  padding: 12px; 
  padding-bottom: 80px; 
}

header { 
  position: sticky; 
  top: 0; 
  background: #0f172a; 
  padding: 6px 0 10px 0; 
  z-index: 10; 
}

.brand-header { 
  text-align: center; 
  margin-bottom: 8px; 
}

.brand-header img { 
  height: 46px; 
  max-width: 90%; 
  object-fit: contain; 
}

.search-box { 
  position: relative; 
  width: 100%; 
}

input[type="search"] {
  width: 100%; 
  padding: 16px 44px 16px 16px; 
  font-size: 18px; 
  border-radius: 12px;
  border: 2px solid #334155; 
  background: #1e293b; 
  color: #fff; 
  outline: none;
}

input[type="search"]:focus { 
  border-color: #38bdf8; 
}

.clear-btn {
  position: absolute; 
  right: 12px; 
  top: 50%; 
  transform: translateY(-50%);
  background: #475569; 
  border: none; 
  color: white; 
  border-radius: 50%; 
  width: 26px; 
  height: 26px; 
  cursor: pointer;
}

.status-bar { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin: 8px 4px 0; 
  font-size: 13px; 
  color: #94a3b8; 
}

.status-right { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
}

.btn-toggle-recent {
  background: #334155; 
  color: #cbd5e1; 
  border: 1px solid #475569; 
  padding: 4px 8px;
  border-radius: 6px; 
  font-size: 12px; 
  font-weight: 500; 
  cursor: pointer;
}

.btn-toggle-recent.active { 
  background: #0369a1; 
  color: white; 
  border-color: #38bdf8; 
}

.btn-install {
  display: none; 
  background: #0284c7; 
  color: white; 
  border: none; 
  padding: 4px 10px;
  border-radius: 6px; 
  font-size: 12px; 
  font-weight: 600; 
  cursor: pointer;
}

.list { 
  display: flex; 
  flex-direction: column; 
  gap: 8px; 
  margin-top: 8px; 
}

.card {
  background: #1e293b; 
  border-radius: 10px; 
  padding: 12px 14px; 
  display: flex;
  justify-content: space-between; 
  align-items: center; 
  border: 1px solid #334155;
}

.card.is-hs { 
  border-color: #f59e0b; 
  background: #1c1917; 
}

.card-info { 
  flex: 1; 
  padding-right: 10px; 
}

.address { 
  font-size: 16px; 
  font-weight: 600; 
  color: #f1f5f9; 
}

.code-row { 
  display: flex; 
  align-items: center; 
  gap: 6px; 
  margin-top: 4px; 
  flex-wrap: wrap; 
}

.code-badge {
  display: inline-block; 
  background: #0284c7; 
  color: white;
  font-size: 17px; 
  font-weight: 700; 
  padding: 4px 10px; 
  border-radius: 6px; 
  letter-spacing: 0.5px;
}

.code-badge.hs { 
  background: #d97706; 
}

.badge-tag {
  font-size: 10px; 
  font-weight: 700; 
  padding: 2px 6px; 
  border-radius: 4px;
  text-transform: uppercase; 
  letter-spacing: 0.5px;
}

.badge-recent { 
  background: #065f46; 
  color: #34d399; 
}

.badge-hs-alert { 
  background: #78350f; 
  color: #fde68a; 
  border: 1px solid #b45309; 
}

.updated-date { 
  font-size: 11px; 
  color: #64748b; 
  margin-top: 4px; 
}

.actions { 
  display: flex; 
  gap: 8px; 
}

.btn-action {
  background: #334155; 
  border: none; 
  color: #cbd5e1; 
  border-radius: 8px;
  padding: 10px; 
  font-size: 14px; 
  cursor: pointer;
}

.btn-action:active { 
  background: #475569; 
}

.btn-add {
  position: fixed; 
  bottom: 16px; 
  right: 16px; 
  background: #0284c7; 
  color: white;
  border: none; 
  width: 56px; 
  height: 56px; 
  border-radius: 28px; 
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4); 
  cursor: pointer; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.modal { 
  display: none; 
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,0.7); 
  align-items: center; 
  justify-content: center; 
  padding: 20px; 
  z-index: 30; 
}

.modal-content { 
  background: #1e293b; 
  padding: 20px; 
  border-radius: 12px; 
  width: 100%; 
  max-width: 400px; 
}

.modal-content input { 
  width: 100%; 
  padding: 12px; 
  margin: 8px 0 16px; 
  background: #0f172a; 
  border: 1px solid #334155; 
  color: white; 
  border-radius: 8px; 
  font-size: 16px; 
}

.modal-btns { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  gap: 8px; 
  margin-top: 10px; 
  flex-wrap: wrap; 
}

.modal-btns-left { 
  display: flex; 
  gap: 6px; 
}

.modal-btns-right { 
  display: flex; 
  gap: 8px; 
  margin-left: auto; 
}

.btn-cancel { 
  background: #475569; 
  color: white; 
  border: none; 
  padding: 10px 14px; 
  border-radius: 6px; 
  font-size: 14px; 
  cursor: pointer; 
}

.btn-save { 
  background: #0284c7; 
  color: white; 
  border: none; 
  padding: 10px 14px; 
  border-radius: 6px; 
  font-size: 14px; 
  font-weight: 600; 
  cursor: pointer; 
}

.btn-save:disabled { 
  opacity: 0.6; 
  cursor: not-allowed; 
}

.btn-delete { 
  background: #dc2626; 
  color: white; 
  border: none; 
  padding: 10px 12px; 
  border-radius: 6px; 
  font-size: 13px; 
  font-weight: 600; 
  cursor: pointer; 
  display: none; 
}

.btn-hs-toggle { 
  background: #d97706; 
  color: white; 
  border: none; 
  padding: 10px 12px; 
  border-radius: 6px; 
  font-size: 13px; 
  font-weight: 600; 
  cursor: pointer; 
  display: none; 
}

#toast {
  visibility: hidden; 
  position: fixed; 
  bottom: 25px; 
  left: 50%; 
  transform: translateX(-50%);
  background-color: #10b981; 
  color: white; 
  padding: 12px 20px; 
  border-radius: 8px;
  font-weight: 600; 
  font-size: 15px; 
  box-shadow: 0 4px 15px rgba(0,0,0,0.5); 
  z-index: 100;
  opacity: 0; 
  transition: opacity 0.2s, bottom 0.2s; 
  pointer-events: none; 
  white-space: nowrap;
}

#toast.show { 
  visibility: visible; 
  opacity: 1; 
  bottom: 35px; 
}
