/* v18 全局操作密码门禁样式（前台活动页 + 后台管理端共用） */

.opg-mask {
  position: fixed;
  inset: 0;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2147482000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 14, 24, .58);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  -webkit-tap-highlight-color: transparent;
}

.opg-mask.is-open {
  display: flex;
  animation: opgFade .16s ease-out;
}

@keyframes opgFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.opg-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(4, 10, 22, .32), 0 2px 6px rgba(4, 10, 22, .12);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #16202e;
  animation: opgPop .18s cubic-bezier(.2, .9, .3, 1.2);
}

@keyframes opgPop {
  from { transform: translateY(10px) scale(.98); opacity: .6; }
  to { transform: none; opacity: 1; }
}

.opg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #eef1f6;
}

.opg-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;
}

.opg-x {
  border: 0;
  background: transparent;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  color: #8b95a6;
  cursor: pointer;
}

.opg-x:hover { background: #f2f4f8; color: #16202e; }

.opg-body { padding: 14px 18px 6px; }

.opg-sub {
  margin: 0 0 8px;
  font-size: 13px;
  color: #4c566a;
}

.opg-sub b { color: #16202e; font-weight: 600; }

.opg-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7686;
  background: #f6f8fb;
  border: 1px solid #eaeff6;
  border-radius: 10px;
  padding: 8px 10px;
}

.opg-note b { color: #16202e; }

.opg-input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #16202e;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.opg-input:focus {
  border-color: #2f6bff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .14);
}

.opg-input:disabled { background: #f4f6f9; color: #9aa4b2; }

.opg-msg {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #6b7686;
}

.opg-msg.is-err { color: #d63a3a; font-weight: 600; }
.opg-msg.is-ok { color: #17864a; font-weight: 600; }

.opg-lock {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdeeee;
  border: 1px solid #f7d4d4;
  color: #b3261e;
  font-size: 12px;
  line-height: 1.5;
}

.opg-hint {
  margin: 12px 0 10px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #97a1b0;
}

.opg-foot {
  display: flex;
  gap: 10px;
  padding: 4px 18px 18px;
}

.opg-btn {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #d7dee8;
  background: #fff;
  color: #3d4759;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}

.opg-btn:hover { background: #f6f8fb; }

.opg-btn.opg-primary {
  border-color: #16202e;
  background: #16202e;
  color: #fff;
}

.opg-btn.opg-primary:hover { background: #24313f; }

.opg-btn:disabled { opacity: .55; cursor: not-allowed; }

/* 轻提示 */
.opg-tipbox {
  position: fixed;
  z-index: 2147482001;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.opg-tipitem {
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(22, 32, 46, .94);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(4, 10, 22, .28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  animation: opgTipIn .2s ease-out;
  max-width: 78vw;
}

.opg-tipitem.is-err { background: rgba(178, 38, 30, .95); }

.opg-tipitem.is-out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s, transform .3s;
}

@keyframes opgTipIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* 后台「操作密码」设置区 */
.opg-card-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #f6f8fb;
  border: 1px solid #eaeff6;
  font-size: 12.5px;
  line-height: 1.7;
  color: #4c566a;
}

.opg-card-state .k { color: #8b95a6; margin-right: 4px; }
.opg-card-state .v { color: #16202e; font-weight: 600; }
.opg-card-state .v.is-ok { color: #17864a; }
.opg-card-state .v.is-off { color: #b3261e; }

.opg-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.opg-quick button {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #3d4759;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12.5px;
  cursor: pointer;
}

.opg-quick button:hover { border-color: #16202e; color: #16202e; }
.opg-quick button.is-on { border-color: #16202e; background: #16202e; color: #fff; }

.opg-inline-tip {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.7;
  color: #8b95a6;
}
