body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #111;
  color: #eee;
}

.view {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card {
  background: #222;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.card h2, .card h3 {
  margin-top: 0;
}

input {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 5px;
  border: none;
}

button {
  width: 100%;
  padding: 8px;
  background: #ff4500;
  border: none;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

.topbar {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  background: #181818;
  border-bottom: 1px solid #333;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

/* DME */
.dme {
  background: #111;
  border-radius: 14px;
  padding: 14px;
  border: 2px solid #333;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.dme-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dme-title {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}

.dme-led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #00ff66;
  box-shadow: 0 0 8px #00ff66;
}

.dme--inactive .dme-led {
  background: #444;
  box-shadow: none;
}

.dme-display {
  background: #050505;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  margin: 12px 0;
  min-height: 50px;
}

.dme-line-main {
  color: #ffcc66;
  font-weight: bold;
  font-size: 14px;
}

.dme-line-sub {
  color: #aaa;
  font-size: 12px;
}

.dme-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dme-volume input[type=range] {
  width: 120px;
}

/* Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 20px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  background-color: #444;
  border-radius: 20px;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: .2s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: .2s;
}
input:checked + .slider { background-color: #00c853; }
input:checked + .slider:before { transform: translateX(22px); }

/* Alarm */
.dme--alarm .dme-display {
  animation: alarmFlash 0.7s infinite alternate;
}
@keyframes alarmFlash {
  from { box-shadow: 0 0 6px #ff4500; }
  to   { box-shadow: 0 0 16px #ff4500; }
}

/* Listen */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list li {
  padding: 6px 0;
  border-bottom: 1px solid #333;
  font-size: 14px;
}
.list li span.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-left: 6px;
  background: #333;
}
