:root {
  --bs-primary: #C72A09;
  --bms-bg: #101010;
  --bms-text: #ffffff;
  --bms-border: rgba(255, 255, 255, 0.35);
}

.bms-widget {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--bms-text);
}

.bms-position-bottom-right {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.bms-position-bottom-left {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
}

.bms-position-inline {
  position: relative;
}

.bms-card {
  min-width: 320px;
  max-width: 420px;
  background: rgba(16, 16, 16, 0.75);
  border: 1px solid var(--bms-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 18px 18px 14px;
}

.bms-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bms-eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  margin: 0 0 4px 0;
  color: rgba(255, 255, 255, 0.7);
}

.bms-title {
  font-family: "Times New Roman", Georgia, serif;
  margin: 0;
  font-size: 22px;
}

.bms-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bms-border);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.bms-status-active { background: #25d48a; }
.bms-status-trialing { background: #ffd166; }
.bms-status-past_due { background: #f8a307; }
.bms-status-canceled { background: #7a7a7a; }

.bms-plan-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.bms-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 4px 0;
}

.bms-value {
  font-size: 16px;
  margin: 0;
}

.bms-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bms-border);
  font-size: 12px;
}

.bms-locations .bms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.bms-chip {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--bms-border);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--bms-text);
  cursor: pointer;
}

.bms-chip small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.bms-chip-active { border-color: rgba(37, 212, 138, 0.7); }
.bms-chip-pending_install { border-color: rgba(255, 209, 102, 0.7); }
.bms-chip-inactive { border-color: rgba(255, 255, 255, 0.25); opacity: 0.7; }

.bms-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bms-badge {
  border: 1px solid var(--bms-border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(199, 42, 9, 0.35);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bms-badge:hover {
  box-shadow: 0 0 16px rgba(199, 42, 9, 0.6);
  transform: translateY(-1px);
}

.bms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.bms-btn {
  cursor: pointer;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--bms-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--bms-text);
  transition: all 0.2s ease;
  text-decoration: none;
}

.bms-btn-primary {
  background: var(--bs-primary);
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(199, 42, 9, 0.35);
}

.bms-btn-primary:hover { background: #e7330b; }

.bms-btn-secondary { background: rgba(255, 255, 255, 0.08); }

.bms-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
}

.bms-helper {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin: 8px 0 0 0;
}

.bms-footer {
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

.bms-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.bms-modal.active { display: flex; }

.bms-modal-content {
  background: rgba(16, 16, 16, 0.9);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--bms-border);
  width: 360px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.bms-modal-content h3 {
  margin-top: 0;
  font-family: "Times New Roman", Georgia, serif;
}

.bms-modal-content label {
  display: block;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.bms-modal-content input,
.bms-modal-content textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--bms-border);
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  color: var(--bms-text);
}

.bms-close {
  background: transparent;
  border: none;
  color: var(--bms-text);
  font-size: 20px;
  float: right;
  cursor: pointer;
}

@media (max-width: 540px) {
  .bms-card { width: 100%; min-width: auto; }
  .bms-position-bottom-right, .bms-position-bottom-left { left: 10px; right: 10px; }
}
