* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F2F5F3;
  color: #222831;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.hidden {
  display: none !important;
}

.login-card {
  max-width: 420px;
  margin: 10vh auto 0;
}

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

.brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E8F8EE;
  color: #07C160;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 17px;
}

p {
  color: #8A94A6;
  font-size: 13px;
  margin-top: 4px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
  margin: 16px 0 8px;
}

input[type="text"],
input[type="password"],
input[type="number"] {
  width: 100%;
  height: 44px;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  background: #F9FAFB;
  outline: none;
}

input:focus {
  border-color: #07C160;
  background: #FFFFFF;
}

button {
  border: none;
  border-radius: 10px;
  height: 44px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button.primary {
  width: 100%;
  background: #07C160;
  color: #FFFFFF;
  margin-top: 22px;
}

button.primary:hover {
  background: #06ad56;
}

button.ghost {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  color: #4B5563;
}

button.danger {
  color: #E11D48;
  border-color: #FECACA;
}

.tip {
  text-align: center;
  color: #9CA3AF;
  font-size: 12px;
  margin-top: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.switch {
  position: relative;
  width: 52px;
  height: 28px;
  margin: 0;
  flex-shrink: 0;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  inset: 0;
  background: #D1D5DB;
  border-radius: 999px;
  transition: background 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: left 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background: #07C160;
}

.switch input:checked + .slider::before {
  left: 27px;
}

.status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.status.on {
  background: #E8F8EE;
  color: #07C160;
}

.status.off {
  background: #F3F4F6;
  color: #6B7280;
}

.scope-row {
  display: flex;
  gap: 18px;
  margin: 12px 0;
}

.radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  margin: 0;
}

.muted {
  color: #9CA3AF;
  font-size: 12px;
}

.save-btn {
  margin-top: 0;
}

.logs {
  margin-top: 12px;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  color: #9CA3AF;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.78);
  color: #FFFFFF;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 99;
}
