/* MCOT Smart Sales - License Gate */
.license-lock-active #main-content,
.license-lock-active #sidebar,
.license-lock-active #sidebar-trigger,
.license-lock-active #mobile-menu-btn,
.license-lock-active #mobile-menu-overlay {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

#license-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(13,59,102,0.96), rgba(28,91,184,0.96));
  font-family: 'Sarabun', sans-serif;
}
#license-gate.show { display: flex; }
.license-card {
  width: min(560px, 100%);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.2);
}
.license-header {
  padding: 24px 26px;
  background: linear-gradient(135deg, #0d3b66, #1c5bb8);
  color: white;
}
.license-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.license-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: white;
  color: #1c5bb8;
  display: grid;
  place-items: center;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.license-title { font-size: 22px; font-weight: 900; line-height: 1.15; }
.license-subtitle { font-size: 13px; opacity: 0.82; margin-top: 4px; }
.license-body { padding: 24px 26px 26px; }
.license-status {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1e40af;
  line-height: 1.45;
}
.license-status.error { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.license-status.success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.license-field label {
  display: block;
  font-weight: 800;
  color: #334155;
  font-size: 13px;
  margin-bottom: 7px;
}
.license-field input {
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}
.license-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.license-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.license-btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.license-btn:active { transform: scale(0.98); }
.license-btn.primary { background: #2563eb; color: white; flex: 1 1 180px; }
.license-btn.secondary { background: #e2e8f0; color: #334155; }
.license-footnote {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.license-valid-badge {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  background: #0f172a;
  color: #facc15;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(15,23,42,0.24);
  pointer-events: none;
}
@media (max-width: 640px) {
  .license-card { border-radius: 18px; }
  .license-header, .license-body { padding: 20px; }
  .license-title { font-size: 19px; }
  .license-valid-badge {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    text-align: center;
    padding: 8px 10px;
    font-size: 10px;
    line-height: 1.25;
  }
}
